
November 18th, 2003, 05:00 PM
|
|
Junior Member
|
|
Join Date: Nov 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Using VBscript To Copy A Folder From The Web To Harddrive
Ok, I'm new at vbscript so forgive me if this is stupid. I want to copy a folder including the subfolders, from my webserver to the person viewing the .hta's harddrive. Let's say my site is URL and that the folder is URL and it contains a text file called text.txt and a folder called files. That folder has three .cfg files in it, names one, two, and three.
What I've been trying to do is:
Code:
dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
If filesys.FolderExists("http://www.site.com/test") Then
filesys.CopyFolder "http://www.site.com/test", "c:\destfolder\"
End If
I took that from some site about vbscripts, it works if the source file is on my harddrive, but not if it is on the internet. So how would I do this? It has to be possible to move files from the web to harddrive using vbscript, but I'm guessing you cant use copyfolder to do it.
If you don't understand me then maybe you can just tell me how to do the following. If I had a file called pic.jpg at URL how would I move that onto someone's harddrive to C:/folder/ usint VBscript?
|