Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fs.copyfile giving error

Status
Not open for further replies.

Jacqui1811

Programmer
Jul 8, 2002
100
SG
Hi,
I am trying to download a file from one server to another, using this code.
FS.copyfile "http:somedomain/somefolder/somemp3.mp3", "c:\dropbox\"
Both of the paths exist and if I put the correct source url into a web browser I can download just fine but I get the following error when running this code.
"Bad file name or number"
Can anybody help please ?
Thanks.
Jacqui.
 
I don't think you can use the File Scripting Object to copy from one server to another - the source and destination need to be within the same domain / network.

--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
Thanks for replying VicVirk,
I was wondering then what can I use to automatically save a file programatically ?
Jacqui.
 
In Classic ASP, you'll need some sort of an FTP component to copy files from a remote server to local - and even then you have to ensure the remote server has FTP access to that file and you have the credentials to access it.

Here's some links:


I use WS_FTP for this type of thing - it comes with a synchronize tool that can be run in command line mode to synchronize a remote server with a local server.



PHP and ASP.NET have built in FTP commands.

--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top