What's new
  • Please do not post any links until you have 3 posts as they will automatically be rejected to prevent SPAM. Many words are also blocked due to being used in SPAM Messages. Thanks!

random file name generator?

Mr. Friendly

Well-known member
Joined
Nov 21, 2007
Messages
2,925
Location
British Columbia
my folks have a lot of pictures with duplicate names that are not the same. are there any tools out there that can go through a folder and give them different names?

trying to amalgamate and sort/delete these so we can start a proper back up system and such.

searched on Google and it gave mes stuff for online file names and jazz, but that's not what I'm looking for. :blarg:
 
Last edited:

JD

Moderator
Staff member
Joined
Jul 16, 2007
Messages
9,136
Location
Toronto, ON
If you just want to append random numbers, PowerShell would suffice?

Code:
Get-ChildItem *.jpg | ForEach-Object{Rename-Item $_ -NewName "$(Get-Random)-$($_.Name).jpg"}
Source: https://superuser.com/a/304700

So if you have mypicture.jpg, it would become 1777702880-mypicture.jpg as an example.

If you Google "delete duplicate images" there's some tools that do that as well. No idea how trustworthy any of them are though.
 

danmitch1

Well-known member
Joined
Dec 15, 2007
Messages
674
I second bulk rename utility. We use it all the time at work, its super powerful. Ive become a pro with it.
 

attonbitusira

Well-known member
Joined
Jan 20, 2009
Messages
167
Location
Guelph
Powershell/BASH scripting is the way to go. I'm more familiar with BASH and can say that it is trivial to search across multiple parent directories and their child folders recursively, get the name, and move them to a single folder with logic to append an integer (random or sequential) if a duplicate exists. Depending on how much you care about the original filename, you could also just copy each filename to a new location with an increasing integer. Lots of ways to skin that cat man.
 
Error 403 Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/youtube.googleapis.com/quotas?project=345236864347 : dailyLimitExceeded

Twitter

Top