Thursday, May 4, 2017

windows - Copy file names with a certain number of characters in command line (CMD)

I need to copy all text files on one folder whose names are five characters long. I know this command is for listing:


$ dir folder /B | findstr /R "^.....\.txt"

but I want to copy all files whose names are listed by the above command
to a different folder.

No comments:

Post a Comment