Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi all
After reading posts here I found a way to move several files from and to another directory. How ever.... It seems that the code will get to long and i wounder if there is a more easy way to this without so many lines.
dir /b *1_*.pdf* > Move_List.txt for /f %%i in (Move_List.txt) do move %%i C:\Tc001 dir /b *2_*.pdf* > Move_List2.txt for /f %%i in (Move_List2.txt) do move %%i C:\Tc002 dir /b *61_*.pdf* > Move_List.txt for /f %%i in (Move_List.txt) do move %%i C:\Tc002G dir /b *3_ *pdf* > Move_List2.txt for /f %%i in (Move_List2.txt) do move %%i C:\Tc003 dir /b *<b></b>pdf* > Move_List.txt for /f %%i in (Move_List.txt) do move %%i C:\Tc003 dir /b *61c_*.pdf* > Move_List2.txt for /f %%i in (Move_List2.txt) do move %%i C:\Tc003B dir /b *61_*.pdf* > Move_List.txt for /f %%i in (Move_List.txt) do move %%i C:\Tc003C dir /b *61c_*.pdf* > Move_List2.txt for /f %%i in (Move_List2.txt) do move %%i C:\Tc003DThere are over 100 different dir. to match :-)
I really hope that someone can help me...

[1] I'm leary of the pdf* , but maybe you have multiple extensions, whci ought to keep things pretty confused.
[2] You can eliminat 1 line per section; skip the creation of a file, llike this:
for /f "tokens=* delims= " %%a in ('dir/b bla*.pdf') do (
move %%a d:\dest
)
Not obvious how you generalize the dest v filename.
=====================================
If at first you don't succeed, you're about average.M2

![]() |
Problem with counting fil...
|
Txt renamer from content?
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |