Emmanuel
Master Tech
- Local time
- , 20:15
- Joined
- Sep 4, 2002
- Messages
- 88
He guys,
I have a quick question regarding a code I wrote. I need to copy some files from one server to another every day, but some times they script starts running before the files are available and that is causing the script to fail. Could someone help me troubleshoot this code to enable it to check if the files are available before it tries to copy them over?
This is the code as it is today:
dim objFSO, strSourceFolder, strDestFolder
Const OverwriteExisting = TRUE
strSourceFolder = "\\tbstpgw3\D\ftp1\*.FLG"
strDestFolder = "C:\Documents and Settings\Me\Desktop\ftp1\"
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile strSourceFolder, strDestFolder, OverwriteExisting
Thank you in advance for your help.
WebManny
I have a quick question regarding a code I wrote. I need to copy some files from one server to another every day, but some times they script starts running before the files are available and that is causing the script to fail. Could someone help me troubleshoot this code to enable it to check if the files are available before it tries to copy them over?
This is the code as it is today:
dim objFSO, strSourceFolder, strDestFolder
Const OverwriteExisting = TRUE
strSourceFolder = "\\tbstpgw3\D\ftp1\*.FLG"
strDestFolder = "C:\Documents and Settings\Me\Desktop\ftp1\"
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile strSourceFolder, strDestFolder, OverwriteExisting
Thank you in advance for your help.
WebManny