Use PowerShell to flatten your folders (batch rename)


/ Published in: Windows PowerShell
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  1. (ls -r -include *.jpg) | % { mv -literal $_ $_.Name.Insert(0, [String]::Format("{0} - ", $_.Directory.Name))}

URL: http://dreamlusion.eucoding.com/doku.php?id=blog:2008:09:flatten_folders_batch_rename

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.