::====== begin batch @for /f %%a in ('dir /b \xxx\*-*-*.pdf | findstr /r "[0-9]*-[0-9]*-[0-9]"') do @echo move \xxx\%%a elsewhere ::====== end batch this will however, pick up files with null between dashes: --999 -8-99 in some cases. Further refinement might be required in the filtering... Take out the echo when you feel brave and confident..
This helps but is moving items I wouldn't expect it to move. I'm testing with 2 files 123-4569-123.pdf and 123-G4569-123.pdf. It moves both of them when I would expect the one with a letter G to not move as it isn't numeric.
My mistake most for getting it wrong. I had it right in my "working model", but I must have hand-typed instead of cut/paste to the forum, and in so doing lost the carat (or easter-bunny made early appearance and stole it). "good eye" for catching my goof, glad you got it working.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.