copying files from subfolders into parent + renaming them
hi,
i have about 1200 folders each with jpg files named from 1.jpg to 15.jpg. The folders themself are named from 1 to 1200 as well. I have to move all the jpg files into one single directory. As they have all the same filenames, i'd need to rename them like <foldername>_<pic_name>.jpg . They also could be just named from 1 to 500000 or whatever, i just need to keep them in order. can you think of any solutions ? thx for your help ! PS: No, theyre NOT porn pics !!! PS2: I could use a Linux system to accomplish this as well. |
Re: copying files from subfolders into parent + renaming them
Get www.autohotkey.com, which allows you to write scripts. Then use this script below.
<font class="small">Code:</font><hr /><pre> This script assuses all the 1200 folders are located in "C:\Pictures" if not move them to this folder or change the script. Also, make a folder called " C:\AllMyPictures" or change script. FolderNameVar=1 PicNameVar=1 Loop, 1200 { Loop, 15 { FileMove, C:\Pictures\%FolderNameVar%\%PicNameVar%.jpg, C:\AllMyPictures\%FolderNameVar%_%PicNameVar%.jpg PicNameVar++ } PicNameVar=1 FolderNameVar++ } Return </pre><hr /> Oh btw this is if you have exactly 1200 folders and 15 pics in each one, I didn't make it parse the directories to count. Does the pic count vary in each folder? |
Re: copying files from subfolders into parent + renaming them
If there's any cute girls in the pictures feel free to post them.
|
Re: copying files from subfolders into parent + renaming them
wow, i have autohotkey, didnt think of that.
yes, sometimes the count may vary sometimes slightly but ill get that to work i think. will post when i find smth appropriate (rather boring stuff) thanks for your help !!! |
All times are GMT -4. The time now is 02:01 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.