-
May 30th, 2014, 08:40 AM
#1
rename files with random names in a folder
hello,
I am prasanth.
I need a code for renaming multiple(bulk or all ) files in a folder.
I found one batch file script but it renaming with numbers only. But i want differntly.
http://www.howtogeek.com/57661/stupi...n-a-directory/
Example:
In a folder there are 100 images and all numbered with some digits or names.
assume that all images are belongs to "john" , so i want to rename all images with "john+ a random string".
here a random string means -> it has an array with 3000 english words, (you can predefine them by downloading from dictonary).
In the script the 3000 names are fixed, but the 1st name will be changed by my wish. that my be john, mary, sai, pavan etc...
Pleaes any one solve this problem....
Sugestion: you do not need to enter all 3000 words in array manually. some javscript codes are there to read input of each and evey line and them into an array.
-
May 30th, 2014, 08:43 AM
#2
Re: rename files with random names in a folder
so that every image will get name like this john good, john bad, john eating, john idiol, john silly etc.........
-
May 30th, 2014, 08:52 AM
#3
Re: rename files with random names in a folder
Originally Posted by prasanthssn
so that every image will get name like this john good, john bad, john eating, john idiol, john silly etc.........
Which part are you stuck on?
Can you get the dictionary into an array?
Can you enumerate the files in a directory?
Can get unique words from the array randomly?
Can you rename files?
If it were me, I'd load the words into a vector or list and call random_shuffle to arrange them randomly, then pull each successive word out of the list for each file I found. That's just one of several approaches.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|