Sign in to follow this  
Followers 0
Harlequin

Rename Media Files....

5 posts in this topic

Ok, so I think this works fairly well, but I just finished it and tested it on one directory. It is still what I would call "Beta".

What it does:

Renames media files (jpg, bmp, mpg, png, gif, tif, avi) based on their date, so in the directories, they will show up in order, and not duplicate names, etc.

It Looks first at the standard Digital EXIF data, and uses that for the file name. If that is absent, then it looks to the file creation date. If that is absent, it will give the file a date of "0000-00-00"

Files are all appended with a 3 digit number, so files with the same date (& time) would be named, for example:

YYYY-MM-DD_HH_MM_SS_###.ext

2008-12-07_14-22-55_001.jpg, 2008-12-07_14-22-55_002.jpg,...2008-12-07_14-22-55_999.jpg

OR:

YYYY-MM-DD_###.ext

2008-12-07_001.jpg, 2008-12-07_002.jpg,...2008-12-07_999.jpg

It DOES NOT check across directories, so in 2 directories, files can end up with the same name, but within the SAME directory they can NOT.

Any suggestions, improvements, etc. are appreciated.


But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security. - U.S. Declaration of Independence

Share this post


Link to post
Share on other sites



Seems to work pretty good.

You should check for if someone presses "Cancel" on the FileSelectFolder @ line 424, at the moment it goes forward whether they press Cancel or not.

Also, you may want to change the name of your Rename button to "Choose folder" or maybe add a line for the file path in the main gui itself that you can fill by using the FileSelectFolder. Calling that button Rename just made me wonder where I was supposed to say what the folder was.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Seems to work pretty good.

You should check for if someone presses "Cancel" on the FileSelectFolder @ line 424, at the moment it goes forward whether they press Cancel or not.

Also, you may want to change the name of your Rename button to "Choose folder" or maybe add a line for the file path in the main gui itself that you can fill by using the FileSelectFolder. Calling that button Rename just made me wonder where I was supposed to say what the folder was.

Good ideas.... both implemented ("cancel" now just exits the program and the button is more descriptive of it's function) !

Also, I will be working on a help file, as well as a few other mostly cosmetic refinements.

Edited by Harlequin

But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security. - U.S. Declaration of Independence

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Good ideas.... both implemented ("cancel" now just exits the program and the button is more descriptive of it's function) !

Also, I will be working on a help file, as well as a few other mostly cosmetic refinements.

Ok, a few quick changes:

1) Removed an unused function (It was there for testing....)

2) added support for 4 character extensions (".jpeg", ".mpeg", ".tiff") and reference to them in the GUI

3) added comments to code for easier readability

4) added notes to COMMENT/UNCOMMENT if someone implements Alphabetic Sequence options

5) I think my brain melted... so I will fix that overnight, and work on the help file later...

Updated Version Attached (it is 430 lines long, so I uploaded the script instead of pasting it in).

Edited by Harlequin

But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security. - U.S. Declaration of Independence

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Ok, a few quick changes:

1) Removed an unused function (It was there for testing....)

2) added support for 4 character extensions (".jpeg", ".mpeg", ".tiff") and reference to them in the GUI

3) added comments to code for easier readability

4) added notes to COMMENT/UNCOMMENT if someone implements Alphabetic Sequence options

5) I think my brain melted... so I will fix that overnight, and work on the help file later...

Updated Version Attached (it is 430 lines long, so I uploaded the script instead of pasting it in).

6) Corrected Month/Day (they would reverse)

7) Updated GUI with Directory selection option (default = "My Dcouments")

8) Made NON-Recursive the default directory option

Please feel free to continue testing & suggesting...

Thanks

EDIT: Moved to Code Samples Forum (Since there really was not a support question here, my bad.)

Edited by Harlequin

But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security. - U.S. Declaration of Independence

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0