I am copying a folder from one server to another.
I am pretty sure that a locked file is causing the COPYFILE to end.
How do I determine the file and/or ignore the lock?
How to determine/ignore which file stops COPYFILE.
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Instead of copying the entire folder, you could use GetFileList and loop through each file in the folder, copying one at a time. Then if one fails, the others will still copy, as you are copying them separately.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
If you need to copy many files and can skip locked files, you might try Unstoppable Copier from here: http://www.roadkil.net/download.php?Fil ... ogramID=29
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
"Instead of copying the entire folder, you could use GetFileList and loop through each file in the folder, copying one at a time. Then if one fails, the others will still copy, as you are copying them separately."
OK - perhaps I was loose in specifics.
I am doing a "...\Apps\*.*" type copy with many sub-folders. I don't think GetFileList would work?
OK - perhaps I was loose in specifics.
I am doing a "...\Apps\*.*" type copy with many sub-folders. I don't think GetFileList would work?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
You could output TREE to a file, use RegEx to parse it to get the full path\filenames, and write that to a file and read through the list, doing a CopyFile on each one. Test for CopyFile success after each Copy using IfFileExists on destination folder.
.
.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!