Print Page | Close Window

Copying Files (http)

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=8232
Printed Date: 01 April 2026 at 7:19am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Copying Files (http)
Posted By: neotrix
Subject: Copying Files (http)
Date Posted: 19 December 2003 at 9:37pm

Hi,

I wanted to know is there a way i can grab a file from my old site instead of reuploading it? there are about 100 Songs in my old site, i want to know if there is a code or something in asp which can directly copy those files form that site to my new site? is it possible ? Long time a ago i saw this feature in the http://www.freeservers.com - Freeservers  CP, it had this option to copy a complete site to the free server account, but i need a code which may do such thing for me. If any one of you knows any thing about it, please do help!




Replies:
Posted By: Semikolon
Date Posted: 21 December 2003 at 1:02pm
try search for any examples @ aspin.com or pscode.com


Posted By: fernan82
Date Posted: 22 December 2003 at 2:37am
Response.ScriptTimeout = 60 * 60
D
im objStream
Set objStream = CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.Open ("URL=http://youroldsite.com/song.mp3")
objStream.SaveToFile Server.MapPath(".") & "song.mp3", 2
objStream.Close()
Set objStream = Nothing

First problem is unless you're old site has directory browsing enabled you can't get a list of the files (I don't think Freeservers could doit neither), and even if you do it won't be that easy to get the list... Second problem is that it most likely will timeout on you if you're host has a timeout set....


-------------
FeRnAN
http://www.danasoft.com/">


Posted By: neotrix
Date Posted: 29 December 2003 at 10:39pm
should i just make a new asp file and put this code there ? and it'll copy it ?


Posted By: neotrix
Date Posted: 29 December 2003 at 11:14pm
it says 500 Internal Server Error


Posted By: Mart
Date Posted: 30 December 2003 at 6:36am
try putting server.ScriptTimeout = 10000000 thats assuming it was a timeout error, please post the full error.


Posted By: neotrix
Date Posted: 01 January 2004 at 2:19am
500 Internal Server Error ??
what can be more details of 500 ?


Posted By: Mart
Date Posted: 01 January 2004 at 6:27am
What line it occured on etc. Paste the whole error in we are not phsycic we cannot look at your code magically and guess where/what the error is.


Posted By: Semikolon
Date Posted: 01 January 2004 at 8:53am
maybe that is the whole error he gets, because friendly error messages is enabled in ie by default... try to disable friendly http error messages in you browser and then paste the whole error you get



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net