Forum Home
Press F1
 
Thread ID: 98016 2009-03-08 00:32:00 DOS or XCOPY experts wanted FoxyMX (5) Press F1
Post ID Timestamp Content User
754565 2009-03-09 02:22:00 Hey wow SyncBack Free looks useful!!Used it a while ago, cant remember why I stopped using it, but it would have been a good reason .. Rob99 (151)
754566 2009-03-09 22:17:00 Try taking out the *.*, putting "" around the D:\Documents and H:\Documents. Also have a look at my blog http://g33kblog.wordpress.com to see if my version works any better :)

Removing the *.* made no difference, it still wouldn't work. Admittedly some of the folders did contain a lot of files but even after moving a lot out it wasn't happy.

I also had a look at your blog but have to say that it fried my brain somewhat trying to figure it all out. :blush:

Anyway, I tried xxcopy and that appears to be working. Haven't had enough files change in the past few days to know for sure but at least it is doing things that xcopy refused to do. :thumbs:

Will look at the other suggestions when I have time but for now my files appear to be getting backed up to the other drive when they are supposed to.

Many thanks for all the help and suggestions. :cool:
FoxyMX (5)
754567 2009-03-09 22:31:00 Quotes are a good idea if the path has spaces in it.

Also, /d can't be helping.

And I was under the impression that you needed to put spaces between switches, ie: command /a /d /c. Am I mistaken?
ubergeek85 (131)
754568 2009-03-09 22:40:00 I setup a mate with SyncBack Free last night, heaps good! Compresses each file as a .zip which was kinda weird but the easy restore options pretty cool!!

I used to use xcopy myself except IIRC I had about 9-10 arguements rather than just 3. I'll try and get a customer to email me the batch script I wrote them and I'll post it up here :)
Chilling_Silence (9)
754569 2009-03-09 23:00:00 Quotes are a good idea if the path has spaces in it .

Also, /d can't be helping .

And I was under the impression that you needed to put spaces between switches, ie: command /a /d /c . Am I mistaken?

Always have put quotes around paths that have spaces in them .

Why would /d not be helping? That is to copy changed files .

It appears to make no difference whether spaces are put between switches or not .
FoxyMX (5)
754570 2009-03-10 00:34:00 I use xcopy and xxcopy all the time:wub

my bat file is just xcopy z:\* e:\ /e/c

or xxcopy z:\* e:\ /e/c

Tried Robocopy on vista but xcopy worked just as well
Never had trouble except too long file names

EDIT But i did have trouble from linux permissions
Gobe1 (6290)
754571 2009-03-10 00:36:00 Here's one that Ive been using successfully for the last year or so (Variations in folder location, but yeah ..)


@ECHO OFF
echo Please run the CMT backup first and then exit Outlook while the backup occurs
echo You need to ensure your cellphone has been unplugged as well, as it tries to re-open Outlook
echo .
echo Once this has been done, then you may proceed
echo .
echo This should always take longer than 30 seconds -- If it doesnt then something is wrong
pause
@ECHO ON
xcopy "c:\CMTBack\*.zip" E:\Backups\CMTBack\*.* /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Outlook" E:\Backups\Outlook /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Outlook\archive.pst" E:\Backups\Outlook\archive.pst /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Clients" E:\Backups\Clients /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Job Sheets" E:\Backups\JobSheets /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Business" E:\Backups\Business /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Business development" E:\Backups\BusinessDevelopment /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\B Report" E:\Backups\BReport /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Business development projects" E:\Backups\BusinessDevelopmentProjects /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Goals & activity" E:\Backups\GoalsAndActivity /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Kiwisaver" E:\Backups\Kiwisaver /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Lead letters" E:\Backups\LeadLetters /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Newsletter" E:\Backups\Newsletter /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Personal" E:\Backups\Personal /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\Planet" E:\Backups\Planet /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\State" E:\Backups\State /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "c:\Data\Documents\supplier address" E:\Backups\SupplierAddress /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "C:\Data\Documents\standard documents" E:\Backups\StandardDocuments /E /V /C /I /F /G /H /R /K /Y /Z /D
xcopy "C:\Documents and Settings\Administrator\Desktop\datagathering" E:\Backups\datagathering /E /V /C /I /F /G /H /R /K /Y /Z /D

As you can see he was backing up specific folders in My Docs, so as to miss out the likes of his My Pictures folder which he backed up independently from this script :)

I think the first time it ran it wasnt sure if the Outlook .pst file was a File or Folder, but other than that its run perfectly day in & day out :)
Chilling_Silence (9)
754572 2009-03-10 09:24:00 Always have put quotes around paths that have spaces in them .

Why would /d not be helping? That is to copy changed files .

It appears to make no difference whether spaces are put between switches or not .

Using /d means that files are copied from the source only if newer than the destination . There's a bit of a trap here in that if you copy from an NTFS partition to a FAT one, this may not work as expected because FAT drives only allow 2s filetime resolution on the directory timestamps, whereas NTFS is <= 1 second .

You may want to try /a (copy only if archive bit set, but don't reset archive bit) or /m (same, but resets archive bit on source so won't get copied unless changed) .
MushHead (10626)
754573 2009-03-10 20:47:00 Geez Chill, that's one muther of a batch file. :waughh:

Think I will make mine a bit fancier now as I didn't know you could do it like that. :banana :p


Gobe1 and MushHead: Thanks for that. Good info to know. :thumbs:
FoxyMX (5)
1 2