
Hi, I have reviewed several topics and replies but cant seem to locate this scenario, if you could point me to a previous topic that would be great. Im trying to get my script to copy files from the PC with a specific extension the first part works (deleting and recreating the folder) the second part does not - I get a permission denied error on Line 6 - and that where it stops, any ideas??
VBSTART
Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FolderExists("C:\Temp") Then
filesys.DeleteFolder "C:Temp"
End If
Set CreateNewFolder = filesys.CreateFolder("C:\Temp")
If filesys.FileExists ("c:\*.doc") Then
filesys.CopyFile "c:\*.doc", "C:\Temp"
End If
VBEND
VBRun>