|
Doug G -> RE: FileSystemObject.CopyFile and Renaming (10/30/2002 23:16:26)
|
Oh, if you are working with a .vbs file you are not using asp at all. asp is built in to the web server. You will be using the Windows Script Host and you won' t be able to use server.mappath. The rest of mojo' s code should work fine though. Try something like this, changing the paths as necessary:
var = cSTR(now())
var = replace(var, " /" , " -" )
var = replace(var, " :" , " _" )
var = replace(var, " " , " ~" )
Dim oFS
Set oFS=CreateObject(" Scripting.FileSystemObject" )
oFS.CopyFile " c:\mypath\oldfile.txt" , " c:\mypath\" & var &" .txt"
Set oFS=Nothing
|
|
|
|