Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
aristosv
- Posts: 19
- Joined: 07 Nov 2013 01:57
#1
Post
by aristosv » 28 Nov 2013 06:46
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
-
foxidrive
- Expert
- Posts: 6031
- Joined: 10 Feb 2012 02:20
#2
Post
by foxidrive » 28 Nov 2013 06:52
It's only going to copy *.id files.
Test it again.
Remove the /E if you don't want subdirectories with *.id files copied.
-
aristosv
- Posts: 19
- Joined: 07 Nov 2013 01:57
#3
Post
by aristosv » 28 Nov 2013 07:50
Thanks.
I removed the /E and now it copies only the *.id files.