Renamer confusion

Started by photomy, November 19, 2017, 04:40:14 AM

Previous topic - Next topic

photomy

I am sure this is a common Renamer goal.  I am completely confused how Renamer works and the instructions do not make much sense to me.   I see no example of this.

I would like to rename a file and have it go into new nested folders based on date:
Folder >> 2014
Folder >> 12_Dec
Folder >> 21 Sun

File new name >> 2014_1221_1028
Last 4 digits I need from original file last 4 digits.  The dates are of course from inside the file - original creation date.

I cannot find an example for this in Help area.  I am migrating toward using IMatch 5 away from Photomechanic.  I could figure out how to do this in Photomechanic in 5 minutes.

Is there a command for date and then append just last four digits of original file name?

Any help would be greatly appreciated.



Mario

The IMatch Renamer comes with a huge set of pre-made steps to rename files based on date and time contained in metadata.
Did none of these steps do what you want? Which ones did you try? What was the problem?

Do you know how flexible and powerful the Text and Variables step is?
It is almost unthinkable that the Renamer is unable to do something a user wants. Even the most strange file naming conventions can be implemented.
Did you take some time to learn a bit about IMatch Variables? This is a core concept of IMatch and is used everywhere. From file window layouts to the Renamer to Viewer, Slide Show and Design & Print.

It seems you have somehow encoded date and time in your file names, in a rather uncommon format?

2014_1221_1028

I assume this means year_monthday_some number? YYYY_MMDD_nnnn ?

You want to extract the last four characters from that string?

Just use Text and Variables step and extract the last four characters of the file name like so:

{File.Name|substrr:0,4}

this gives you 1028

Tip: Just copy/paste the variable from above into the VarToy App to see how it works and what it returns for your files.

Of course IMatch does not limit this to file names only. You can extract parts of the folder name, the extension, any metadata tag etc. in the same way.
If you want to extract text from the beginning use substr (without the trailing r) instead.
Try it out in the VarToy then copy it into your Renamer preset.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

photomy

Thanks.  I did finally figure out the basics of trying to organize the files and names.  Actually, the last four digits of the original file is always the original frame name that I wanted to preserve - hence the subsstr command required.  No "time" involved.

I also learned:

It seems I need to import the source raw file folder into the catalog first in order to use the Renamer function.  In the end I do not want the source file folder in the catalog - only the final organized version.  Is there a way to use Renamer commands to act on a folder outside of the catalog as the source folder?

Second, I need to do the step of "selecting" the images I would like to rename.  It does not operate by just selecting a folder with the option of also renaming/organizing sub-folders.  Am I correct on this?

Mario

QuoteIt seems I need to import the source raw file folder into the catalog first in order to use the Renamer function.

This is correct. IMatch neither knows nor cares about files not indexed in the database. IMatch is a DAM and the database is the core of it all.

QuoteSecond, I need to do the step of "selecting" the images I would like to rename.  It does not operate by just selecting a folder with the option of also renaming/organizing sub-folders.  Am I correct on this?

Can't follow you here. To select the files you want to rename, select them in a file window, then open the Renamer with <Ctrl>+<F2>.
Many commands can operate when only a folder is selected, but the Renamer cannot. The Renamer uses the sequence in which the files appear in the File Window to determine the sequence in which they are renamed. This makes it very easy to rename files in a specific order. Or to rename all files in a folder, or multiple folders. Or a category or multiple categories. Or in a collection, time-line node, search result, ...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

QuoteIt does not operate by just selecting a folder with the option of also renaming/organizing sub-folders.  Am I correct on this?
Show files with hierarchy is your answer here. (The icon with the many horizontal lines on top of the F&M window.)

This will show you all files in subfolders. The select all and run renamer.

photomy

Yes, thanks.  Actually what would be nice is when importing/adding new files to the catalog via clicking a folder in the Windows Browser option, which gives the option for sub-folders, there would be another option to Copy the files from the selected folder to new folders as stipulated in a selected Renamer preset and rename the files contained from the same preset.  This would be similar to the option Lightroom offers when first adding files to the catalog.

It seems as though all of the mechanisms are already in the system - just needs the automation.  But I am not a programmer - obviously.

Aubrey

When keeping file number I suggest you add a 0
File number 1024 to 01024.
Otherwise when you get to 9999 your files will then have an extra digit. I recently ran into this issue.
When I got my new camera I started with 00001.

Aubrey.

Mario

I forgot to mention the SubString and Reverse SubString Renamer steps.
They also enable you to extract sections from the beginning or end of the original file name (if you put them at the beginning) or from any part of the produced output file name if you include them down the step stack.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

photomy

Thanks, I think I am figuring it out.  Simply renaming files is basic for the most part and Renamer does a great job at this.  I was also trying to organize a batch of incoming files into newly created folders each named by year, month, day.  This was causing me some problems.  Is there a best way to do this?  Move or Copy command?

Mario

Move or Copy command?

Usually Move, except you want to keep the original files in the original folder as well.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

herman

Quote from: photomy on November 21, 2017, 05:24:53 PMI was also trying to organize a batch of incoming files into newly created folders each named by year, month, day.  This was causing me some problems.  Is there a best way to do this?  Move or Copy command?
Seems similar to what I do at image ingest time.

I ingest images by dragging them in Windows Explorer from the SD card to a folder Image_ingest which is in the IMatch database but outside my normal image folder hierarchy.

When IMatch has imported the images I select all and write-protect them.

Next I call the appropriate renamer definition via a shortcut in the favorites panel.

The renamer renames the files to a YYYYMMDD-HHMMSS format and then copies them to folders in an YYYY\YYY-MM-DD hierarchy.

It copies to two folder structures, the one on the D: drive is my working set, the other one, on the Z: drive, is my backup.

After copying I delete the files in the ingest folder.

The second copy operation could be replaced by a move operation, but IMatch does not support copy and move in one renamer definition, and I never bothered to submit a feature request for this as all is required is just a couple of keystrokes.

The attached screenshot shows this perhaps better that I can describe  ;)
Enjoy!

Herman.