I think what you've got there is nearly Ok. I would tweak as below:
- Move the *.* from target to source
- Double up the quotes on the command line to cater for spaces in the paths
- Space out the XCopy switches
- Add 2>&1 so that errors are also written to the log
- Hmm that should be all!
Make sure that the dirname folder already exists or I'm not sure the logfile will get written / may cause an error.
Change the 1 on the Run line to 0 to hide the 'dos' style window.
Hope this helps,
Daz.
Main Topics
Browse All Topics





by: Tompa99Posted on 2009-08-13 at 04:13:46ID: 25087006
Hi there
I did write down more or less what you have here in one script that is working.
Since the logfile.txt folder may not exists I did add a check for that and create the folder
if I get false on foldercheck.
I hope this is giving you what you are looking for.
Best Regards Tompa
Select allOpen in new window