473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Copying files from the server to the PC

Hi how do i copy a file from the server to the PC?
Const ForWriting=2
strPath = Server.MapPath("datos.xml")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set oFile = fso.GetFile(strPath)
Set tso = oFile.OpenAsTextStream(ForWriting)

sob=1
CopyFile "datos.xml", file://c:/datos.xml, sob
Feb 20 '06 #1
10 1557

JimmySlam wrote:
Hi how do i copy a file from the server to the PC?
Const ForWriting=2
strPath = Server.MapPath("datos.xml")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set oFile = fso.GetFile(strPath)
Set tso = oFile.OpenAsTextStream(ForWriting)

sob=1
CopyFile "datos.xml", file://c:/datos.xml, sob

Basic file copy:

<%
dim fso
set fso=CreateObject("Scripting.FileSystemObject")
If fso.FileExists("c:\sourcefolder\anyfile.html") Then
fso.CopyFile "c:\sourcefolder\anyfile.html", "c:\destfolder\"
End If
%>

However, you need to say where the server is in relation to the PC you
want to write to. Are they on the same network? Or do you propose to
perform some action that will copy a file from a web server to a
visitors PC?

/P.

Feb 20 '06 #2

"Paxton" <pa*******@hotmail.com> escribió en el mensaje
news:11*********************@o13g2000cwo.googlegro ups.com...
yeah the problem is I am using a host on the internet. So I dont know the
path and i dont know how to call to the drive C on the local computer.

JimmySlam wrote:
Hi how do i copy a file from the server to the PC?
Const ForWriting=2
strPath = Server.MapPath("datos.xml")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set oFile = fso.GetFile(strPath)
Set tso = oFile.OpenAsTextStream(ForWriting)

sob=1
CopyFile "datos.xml", file://c:/datos.xml, sob

Basic file copy:

<%
dim fso
set fso=CreateObject("Scripting.FileSystemObject")
If fso.FileExists("c:\sourcefolder\anyfile.html") Then
fso.CopyFile "c:\sourcefolder\anyfile.html", "c:\destfolder\"
End If
%>

However, you need to say where the server is in relation to the PC you
want to write to. Are they on the same network? Or do you propose to
perform some action that will copy a file from a web server to a
visitors PC?

/P.

Feb 20 '06 #3
JimmySlam wrote:
yeah the problem is I am using a host on the internet.
So I dont know the path and i dont know how to call to
the drive C on the local computer.


http://aspfaq.com/show.asp?id=2161

Want to do it without user interaction? Tough. It's a security violation.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Feb 20 '06 #4
yeah of course im not a hacker!!

I just have to upload pictures and then download them with one click to an
specific folder to the PC thats all. If i candownload a folder insted files
would be better.

Cheers.


"Dave Anderson" <GT**********@spammotel.com> escribió en el mensaje
news:OU**************@TK2MSFTNGP14.phx.gbl...
JimmySlam wrote:
yeah the problem is I am using a host on the internet.
So I dont know the path and i dont know how to call to
the drive C on the local computer.


http://aspfaq.com/show.asp?id=2161

Want to do it without user interaction? Tough. It's a security violation.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.

Feb 20 '06 #5
JimmySlam wrote:
yeah of course im not a hacker!!
Right. But if you can do it, then so can a hacker.
I just have to upload pictures and then download them with
one click to an specific folder to the PC thats all. If i
candownload a folder insted files would be better.


Sounds like you need WebDAV.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Feb 20 '06 #6
Sorry?

"Dave Anderson" <GT**********@spammotel.com> escribió en el mensaje
news:ur**************@TK2MSFTNGP14.phx.gbl...
JimmySlam wrote:
yeah of course im not a hacker!!


Right. But if you can do it, then so can a hacker.
I just have to upload pictures and then download them with
one click to an specific folder to the PC thats all. If i
candownload a folder insted files would be better.


Sounds like you need WebDAV.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.

Feb 20 '06 #7
> JimmySlam wrote:
"Dave Anderson" <GT**********@spammotel.com> escribió en el mensaje
news:ur**************@TK2MSFTNGP14.phx.gbl...
JimmySlam wrote:
yeah of course im not a hacker!!
Right. But if you can do it, then so can a hacker.
I just have to upload pictures and then download them with
one click to an specific folder to the PC thats all. If i
candownload a folder insted files would be better.


Sounds like you need WebDAV.

Sorry?

http://www.google.co.uk/search?hl=en...e+Search&meta=

/P.

Feb 20 '06 #8
Looks interesting, how do I use it?
"Paxton" <pa*******@hotmail.com> escribió en el mensaje
news:11**********************@f14g2000cwb.googlegr oups.com...
JimmySlam wrote: "Dave Anderson" <GT**********@spammotel.com> escribió en el mensaje
news:ur**************@TK2MSFTNGP14.phx.gbl...
JimmySlam wrote:
yeah of course im not a hacker!!
Right. But if you can do it, then so can a hacker.
I just have to upload pictures and then download them with
one click to an specific folder to the PC thats all. If i
candownload a folder insted files would be better.


Sounds like you need WebDAV.

Sorry?

http://www.google.co.uk/search?hl=en...e+Search&meta=

/P.
Feb 20 '06 #9

JimmySlam wrote:
"Paxton" <pa*******@hotmail.com> escribió en el mensaje
news:11**********************@f14g2000cwb.googlegr oups.com...
JimmySlam wrote:
"Dave Anderson" <GT**********@spammotel.com> escribió en el mensaje
news:ur**************@TK2MSFTNGP14.phx.gbl...
JimmySlam wrote:
> yeah of course im not a hacker!!

Right. But if you can do it, then so can a hacker.

> I just have to upload pictures and then download them with
> one click to an specific folder to the PC thats all. If i
> candownload a folder insted files would be better.

Sounds like you need WebDAV.

Sorry?

http://www.google.co.uk/search?hl=en...e+Search&meta=

/P.

Looks interesting, how do I use it?

I've got absolutely no idea, but if I wanted to use it or find out more
about it, I'd read some of the links and do a bit more searching.

Just a thought.....

/P.

Feb 20 '06 #10
top.
to
bottom
from
read
not
do
conversations
sentences,
Like
toppost.
not
do
Please

JimmySlam wrote:
Looks interesting, how do I use it?


In the barest sense, you can use Internet Explorer and IIS. I'm not sure
about versions prior to 6, but in IIS 6, enable WebDAV in Web Service
Extensions. Then use the [Web Sharing] tab on the target folder's properties
to open a WebDAV share. In IE, go to

File : Open : [Type URL and check Open as Web Folder]

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Feb 22 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
1
by: Sarah | last post by:
Hi, Can someone please tell me if there's a way to copy image files from one server to another using ASP and FSO? Or perhaps some other way to do it? I'm trying to collect information on...
11
by: KK | last post by:
Hello, I am running into a problem for copying files between 2 different servers. I am using the following lines of code to do that, but I get a 'permission denied' error Set fso =...
0
by: Dan | last post by:
We debug a VB.Net App that uses compact framework to a DAP Windows CE.Net device. When I debug I would like to only have the EXE copied down. Right now it copies any referrences as well and...
2
by: Peter Sands | last post by:
Hi, I am testing out some restores to a stand-by server, by roll-forwading the logs. I have this setup. There is no user-exit, but logretain is on, for archive logging. I have 2 DB's on...
2
by: Stefan Schneider | last post by:
Hi, I have to copy an existing database from one Windows-Server to another one. The source database is a 8.1.0 database on a Windows 2000 Server, the destination database will be a newer 8.x...
5
by: TB | last post by:
Hi All: This news group is proving to be great help on my path towards mastering ASP.NET thanks to all of you helpful souls out there. I am looking forward to the day when I can contribute...
2
by: | last post by:
Hello, I have a program that starts a new thread to backup files from a computer over the network to our server. The problem is when it is copying the files you can hardly navigate around in...
4
by: zMisc | last post by:
Is it possible to copy a table from one schema to another schema by just copying the frm file to the directory for the new schema? What is the best way to create a new database with all the...
4
by: DudDav | last post by:
Hi All, I have been trying to configured WebDAV on our current IIS server as an alternative to FTP and have had some mixed success but I've hit a brick wall with one problem. The server...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.