I found several examples of renaming files but this one is simple and easy to change.
gci -include *.txt -recurse|ren -newname {($_.name).substring(3)}
Note: no carriage return, this is a single command
Note: Doesn't like spaces in the filenames
Run this command from the parent folder and it'll rename all the file types in the folder and all subfolders. The only limitation I found is special characters in the folder or filename.
No comments:
Post a Comment