Page 1 of 1

Backing up specific file formats

Posted: 28 Nov 2013 06:46
by aristosv
I am trying to backup a bunch of *.id files, so I am using the batch file below.

Code: Select all

SET xcopy=XCOPY /D /E /C /I /H /R /K /Y
SET idfiles="C:\Documents and Settings\%username%\IDFiles\*.id"
SET datadest="C:\Backup"
%xcopy% %idfiles% %datadest%\IDFiles


My problem is that any other files/folders in the "IDFiles" folder are also copied over to the backup folder.

What can I do to backup only the *.id files?

Thanks

Re: Backing up specific file formats

Posted: 28 Nov 2013 06:52
by foxidrive
It's only going to copy *.id files.

Test it again.

Remove the /E if you don't want subdirectories with *.id files copied.

Re: Backing up specific file formats

Posted: 28 Nov 2013 07:50
by aristosv
Thanks.

I removed the /E and now it copies only the *.id files.