How can I save just a-k named files?

dbarton

Distinguished
Nov 30, 2008
8
0
18,510
to make a backup, I want to do this:

robocopy g:\ i:\BU_G /s /xo /purge /xf pagefile*.* /w:1 /r:1

BUT
*only* on files whose names start with 0-9 or a-k


Is there a way in batch files?
 
Here is an example using Xcopy that you may convert to your robocopy

Open up a text editor and type in the commands. When done save as whatever.Bat. then just click on the bat file. You choose name for "whatever", but need the DOT bat extention.

E:\ = Drive E Root directory. I:\BU_E is where you want it back-uo to
In my example - copy every thing from drive E to Folder BU_E on drive I
For an explaination of the /x - open a dos window and type xcopy /?

xcopy E:\a*.* I:\BU_E /E /S /I /R /Y /D
xcopy E:\B*.* I:\BU_E /E /S /I /R /Y /D
xcopy E:\C*.* I:\BU_E /E /S /I /R /Y /D
ect
 

dbarton

Distinguished
Nov 30, 2008
8
0
18,510
Thanks. Found a way to use robocopy and batch files..
Was hoping for an elegant way to not type 36 lines, but seems to work. :)