/ Published in: Windows PowerShell
URL: http://dreamlusion.eucoding.com/doku.php?id=blog:2008:09:flatten_folders_batch_rename
This command will recursively move your *.jpg images into the current directory, and add the originally containing directory name as a prefix for the image file.
Expand |
Embed | Plain Text
(ls -r -include *.jpg) | % { mv -literal $_\3 $_\3.Name.Insert(0, [String]::Format("{0} - ", $_\3.Directory.Name))}
Comments
Subscribe to comments
You need to login to post a comment.

Link is dead...