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))}


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.