I would like to traverse a folder and all it’s subfolders, keep a counter variable of the current file and rename it to $counter$ExistingFileName.
E.g.
$count = 1;
foreach $file in $folder
{
$file.name = $count + $file.name;
$count++;
}
The person who can answer this will be my hero! 🙂
Btw I am using Windows 7.
All right, while you are pondering over my questions in my comment to your post (or maybe still making your way back to this site to read them), here’s my trial shot:
This will rename your files by simply prepending their names with numbers, like this:
If you like, you can have it this way:
For that you’ll need to make two changes to the above script (highlighted in bold):