Renaming and filing by name

Started by dcb, February 05, 2014, 09:02:57 AM

Previous topic - Next topic

dcb

There may be a way to do this in one step. If so, let me know.

As part of my workflow I rename all my files into a standard format and then file them in sub-folders. The format is ######.ext where I started at 000000.ext and am currently at 023647.jpg. Files are collected into sub-folders according to the first three digits of their number. This gives me a folder structure of:

I:\assets\000000
I:\assets\001000
...
I:\assets\023000

Each folder has approximately 1000 files within it. Some have more as I store versions there as well (######-##.ext).

To help manage this process I've set up two Renamer presets.

Step 1 - Default

The first is very simple. It renames files as 6 digits with a global sequence number that is remembered by IMatch from rename to rename. A screenshot is attached.

Step 2 - File and archive

The second step moves each file according to the first three digits of its number. File 002564.jpg would be filed to I:\assets\002000 whereas file 156485.dng would be filed in I:\assets\156000.

The trick here is to firstly feed the original filename to the renamer (the original name now being the ######.ext format name) and then grab the first three digits, zero-padding the last three e.g., 002 as the first three digits, then 000 padded at the end to give 002000. All the work is done by:

I:\assets\{File.Name|substr:0,3}000

I prefix the root folder of my archive then use {File.Name|substr:0,3}000 to get the first 3 numbers of the filename (start at 0, take 3). Then I force 000 on the end.

I found I needed this second step because if I did the substr on the original-original filename the folder was based on whatever the file was original called, not what it would be renumbered to.

Two further attachments show the complete setup for this step.



[attachment deleted by admin]
Have you backed up your photos today?