Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Can anyone help me with a batch file that moves files if they are a certain string of names. I have files called repFS1.dat to repFS1000.dat and one file called repFSlist.dat and I want all 1000 + 1 files to be moved from one file to another file. I've tried google, but can't seem to get the suggestions to work. Thanks,

you can use the IF function
IF '%ATT1%'=='WHAT THE ATTRIBUTE CONTAINS' COMMAND TO PERFORM IF IT HAPPENS
for example:
if '%filename1%'=='HELLO!' echo Hello!!

How do you incorporate that into the MOVE command though?
I tried
if '%repfs%'==MOVE C:\Documents and
Settings\User\Desktop\batch test\ "C:\Documents and
Settings\User\Desktop\batch test\"But that doesn't seem to work.

Here's what I have but it is still not working. Any thoughts?
Thanks.MOVE "C:\batch test\repFS*.dat" "C:\batch test\"

![]() |
DLL protection
|
Accessing to a network
|
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |