Author Topic: Renamer  (Read 2081 times)

vbt

  • New Members
  • *
  • Posts: 39
Renamer
« on: November 24, 2019, 10:47:43 PM »
I downloaded the trial version of IMatch and am now working out how best to edit files with external programs.

I was planning to use a “For Editing” folder kept in a fixed location for that purpose. Then in my editing programs I would always be working in the same folder. So the first step of my workflow would be, from within IMatch, to move the files to the “For Editing” folder. Then edit them (creating new versions rather than overwriting the originals) with an external program and finally running renamer to put the files back to their original folders.

My problem is my folders are named in the format “YYYY-MM-DD {some descriptive text}” so e.g. “2019-07-27 Johns Birthday”. (The date at the start of the folder name is unique to each folder.) Is there any way to get renamer to put the files in the existing folders rather than create new folders? So in the case of my example put files captured on 27/7/2019 back in folder “2019-07-27 Johns Birthday” rather than create a new folder “2019-07-27”.

Jingo

  • Super Hero
  • ****
  • Posts: 1877
Re: Renamer
« Reply #1 on: November 24, 2019, 11:18:01 PM »
I think you may be complicating things much more than necessary... a workflow for this would typically entail:

1 - import manually (or set a watched folder) the images in your finalized folder structur (ie: 2019-07-27 Johns Birthday)
2 - Set a flag or keyword or color on these images either during import or after to indicate they "need editing"
3 - Edit your images in whatever external folder you wish and save them either to a subfolder or into the same folder with a different filename (ie: _edited)
4 - Use versioning to pick up the edits and link them to the original files... set the edited version as the Display version so it shows instead of the original.

This is just one way to use IM to manage versions of the same image.... there are many ways to accomplish this.  Enjoy and welcome - Andy.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 30082
Re: Renamer
« Reply #2 on: November 24, 2019, 11:21:48 PM »
Hi, welcome to the community.

The Renamer is designed to rename files. You can in addition use it to move files into a different folder.
But that's not the main purpose of the Renamer.

If the folder already exists, did you add it to your IMatch database?
If yes, you can just use copy and paste (or drag and drop) to move the file in IMatch to the folder.
Select the files in a file window and press Ctrl+C (for copy) or Ctrl+X (for move).
Select the target folder and press Ctrl+V to paste the files. Exactly as you would do in Windows Explorer.

See File Management in IMatch for more info.

If the folder does not exist, you can either create it  in IMatch (in the Media & Folders View) or you can use a move or copy step in the Renamer.

Quote
s there any way to get renamer to put the files in the existing folders

A folder can exist only once. If you move/copy your files using the Renamer, a new folder is only created if the name you use is unique. Else the existing folder is used.
I suggest you double-check the expression you use in the Renamer to produce the name of the output folder. Most likely it creates unique folders which did not exist before.
Use the Preview button in the Renamer to test.

vbt

  • New Members
  • *
  • Posts: 39
Re: Renamer
« Reply #3 on: November 24, 2019, 11:29:44 PM »
I think you may be complicating things much more than necessary... a workflow for this would typically entail:

1 - import manually (or set a watched folder) the images in your finalized folder structur (ie: 2019-07-27 Johns Birthday)
2 - Set a flag or keyword or color on these images either during import or after to indicate they "need editing"
3 - Edit your images in whatever external folder you wish and save them either to a subfolder or into the same folder with a different filename (ie: _edited)
4 - Use versioning to pick up the edits and link them to the original files... set the edited version as the Display version so it shows instead of the original.

This is just one way to use IM to manage versions of the same image.... there are many ways to accomplish this.  Enjoy and welcome - Andy.

Thanks for the reply. I agree with your suggested workflow for newly taken photos i.e. where many photos are in the same folder to begin with. Also if I was only editing a single image then I would, from within IMatch, open with the external editor and that editor would opened at the right folder.

The workflow I was referring to is where I have a number of images in different folders that I want to edit at the same time, particularly if I wanted to give the photos the same or similar treatment. The aim is avoid having to navigate a lot in the external editor and to have all the images near each other in the external editor.

vbt

  • New Members
  • *
  • Posts: 39
Re: Renamer
« Reply #4 on: November 24, 2019, 11:47:41 PM »
Hi, welcome to the community.

The Renamer is designed to rename files. You can in addition use it to move files into a different folder.
But that's not the main purpose of the Renamer.

If the folder already exists, did you add it to your IMatch database?
If yes, you can just use copy and paste (or drag and drop) to move the file in IMatch to the folder.
Select the files in a file window and press Ctrl+C (for copy) or Ctrl+X (for move).
Select the target folder and press Ctrl+V to paste the files. Exactly as you would do in Windows Explorer.

See File Management in IMatch for more info.

If the folder does not exist, you can either create it  in IMatch (in the Media & Folders View) or you can use a move or copy step in the Renamer.

Quote
s there any way to get renamer to put the files in the existing folders

A folder can exist only once. If you move/copy your files using the Renamer, a new folder is only created if the name you use is unique. Else the existing folder is used.
I suggest you double-check the expression you use in the Renamer to produce the name of the output folder. Most likely it creates unique folders which did not exist before.
Use the Preview button in the Renamer to test.

Thanks for the reply. The folders would orginally be created by IMatch as YYYY-MM-DD but then have descriptive text added by me later.

If I didn't add the descriptive text then I would be able to do what I want. Otherwise if I wish to keep descriptive text in my folder names then it seems I cannot use Renamer to re-file files later. I will just have to move them back manually (from within IMatch) which is just a bit more time consuming but certainly still feasible.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 30082
Re: Renamer
« Reply #5 on: November 24, 2019, 11:51:54 PM »
I'm not sure that I understand.
Adding text to a folder name does not impact the Renamer...?
You can still rename files or move/copy files to any folder on your hard disk.

Jingo

  • Super Hero
  • ****
  • Posts: 1877
Re: Renamer
« Reply #6 on: November 24, 2019, 11:55:57 PM »
I think you may be complicating things much more than necessary... a workflow for this would typically entail:

1 - import manually (or set a watched folder) the images in your finalized folder structur (ie: 2019-07-27 Johns Birthday)
2 - Set a flag or keyword or color on these images either during import or after to indicate they "need editing"
3 - Edit your images in whatever external folder you wish and save them either to a subfolder or into the same folder with a different filename (ie: _edited)
4 - Use versioning to pick up the edits and link them to the original files... set the edited version as the Display version so it shows instead of the original.

This is just one way to use IM to manage versions of the same image.... there are many ways to accomplish this.  Enjoy and welcome - Andy.

Thanks for the reply. I agree with your suggested workflow for newly taken photos i.e. where many photos are in the same folder to begin with. Also if I was only editing a single image then I would, from within IMatch, open with the external editor and that editor would opened at the right folder.

The workflow I was referring to is where I have a number of images in different folders that I want to edit at the same time, particularly if I wanted to give the photos the same or similar treatment. The aim is avoid having to navigate a lot in the external editor and to have all the images near each other in the external editor.

For this scenario - I would still use flags, labels, pins and/or categories-keywords... heck, you can even select each file across multiple folders and add them to a single result window.  Once you have all the items tagged/flagged or in the results window, just select them all and open in your external app of choice... Easy!

JohnZeman

  • Global Moderator
  • *****
  • Posts: 1463
  • I'm too damn old to act my age.
Re: Renamer
« Reply #7 on: November 25, 2019, 12:18:48 AM »

If I didn't add the descriptive text then I would be able to do what I want.

Welcome to the community vbt.

Have you considered using Friendly names for your folders?  You could name the actual folders in the YYYY-MM-DD format and then make the friendly name for the folders YYYY-MM-DD plus the descriptive text.

vbt

  • New Members
  • *
  • Posts: 39
Re: Renamer
« Reply #8 on: November 25, 2019, 12:32:37 AM »
I think you may be complicating things much more than necessary... a workflow for this would typically entail:

1 - import manually (or set a watched folder) the images in your finalized folder structur (ie: 2019-07-27 Johns Birthday)
2 - Set a flag or keyword or color on these images either during import or after to indicate they "need editing"
3 - Edit your images in whatever external folder you wish and save them either to a subfolder or into the same folder with a different filename (ie: _edited)
4 - Use versioning to pick up the edits and link them to the original files... set the edited version as the Display version so it shows instead of the original.

This is just one way to use IM to manage versions of the same image.... there are many ways to accomplish this.  Enjoy and welcome - Andy.

Thanks for the reply. I agree with your suggested workflow for newly taken photos i.e. where many photos are in the same folder to begin with. Also if I was only editing a single image then I would, from within IMatch, open with the external editor and that editor would opened at the right folder.

The workflow I was referring to is where I have a number of images in different folders that I want to edit at the same time, particularly if I wanted to give the photos the same or similar treatment. The aim is avoid having to navigate a lot in the external editor and to have all the images near each other in the external editor.

For this scenario - I would still use flags, labels, pins and/or categories-keywords... heck, you can even select each file across multiple folders and add them to a single result window.  Once you have all the items tagged/flagged or in the results window, just select them all and open in your external app of choice... Easy!

Am I doing something wrong? If I create a category with all the photos I want to edit, then from the categories view select all the photos, then drag them all over onto a favorite "Raw Therapee" run application icon, then "Raw Therapee" only shows one of the photos. (I have a similar but not identical problem if I try but using "Dark Table" application.)

vbt

  • New Members
  • *
  • Posts: 39
Re: Renamer
« Reply #9 on: November 25, 2019, 12:36:49 AM »

If I didn't add the descriptive text then I would be able to do what I want.

Welcome to the community vbt.

Have you considered using Friendly names for your folders?  You could name the actual folders in the YYYY-MM-DD format and then make the friendly name for the folders YYYY-MM-DD plus the descriptive text.

Thanks for the reply. This is quite a forum. I am used to waiting ages and maybe getting no replies. So having so many responses so promptly is great.

I didn't know about this feature and it is certainly a possibility as within IMatch it would do what I am wanting. (The only downside is if i were to navigate to my picture folders outside IMatch then I wouldn't have the friendly names. But that is something I should probably not be doing.)

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 30082
Re: Renamer
« Reply #10 on: November 25, 2019, 09:12:39 AM »
Am I doing something wrong? If I create a category with all the photos I want to edit, then from the categories view select all the photos, then drag them all over onto a favorite "Raw Therapee" run application icon, then "Raw Therapee" only shows one of the photos. (I have a similar but not identical problem if I try but using "Dark Table" application.)

Most likely not. IMatch uses the official Windows protocols for drag & drop. It is entirely up to the receiving application how it handles drag and drop messages. IMatch cannot influence that.

When you drop to Windows Explorer, it copies/moves all the files dragged from IMatch.
Photoshop and ACR open all files. Lightroom switches to the folder of the first (?) file dropped in developer view.
DxO opens only the first file. Raw Therapee apparently too. Probably the developers did not bother much with handling dropped files properly.

You can try to open the RT application first and then drag & drop files from IMatch to the application window. Sometimes this changes the behavior. Else contact the RT developers and ask them to support multi-file drops.

vbt

  • New Members
  • *
  • Posts: 39
Re: Renamer
« Reply #11 on: November 25, 2019, 11:52:45 AM »

Most likely not. IMatch uses the official Windows protocols for drag & drop. It is entirely up to the receiving application how it handles drag and drop messages. IMatch cannot influence that.

When you drop to Windows Explorer, it copies/moves all the files dragged from IMatch.
Photoshop and ACR open all files. Lightroom switches to the folder of the first (?) file dropped in developer view.
DxO opens only the first file. Raw Therapee apparently too. Probably the developers did not bother much with handling dropped files properly.

You can try to open the RT application first and then drag & drop files from IMatch to the application window. Sometimes this changes the behavior. Else contact the RT developers and ask them to support multi-file drops.
Thanks, that is what I thought which is why I was trying to devise a workflow to make things a bit easier. (I did just try your suggestion of seeing whether opening RT first would help but it didn’t. I also don’t hold out any hope of the receiving apps I use changing their drag and drop behaviour soon.)

The situation I was trying to cover was where I wished to edit, at the same time, a number of photos from various different folders on my pc. I would mark them all with a red pin, then from the red pin collection cut and paste them into one file folder. That way they would all be easy to find in my external editor(s) as they would all be in the same folder.

I was hoping once I finished editing the photos it would then be easy to refile them back in their original folders using the date the photos were taken. My folder naming convention is: “YYYY-MM-DD Manually Added Description”. Renamer would be able to refile the photos if my folder naming convention was just “YYYY-MM-DD”. I was hoping there was some way Renamer could cover my situation i.e. if the first 10 characters of an existing folder’s name matches the capture date in “YYYY-MM-DD” format then file the photos there rather than creating a new folder with just the name “YYYY-MM-DD”.

It seems not, however JohnZeman’s suggestion comes close i.e. stick to using “YYYY-MM-DD” as the folder names (so Renamer can refile photos) and use folder friendly names to display, within IMatch, the more descriptive folder names I want. The downside is I won’t have as descriptive folder names if I am working outside IMatch.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 30082
Re: Renamer
« Reply #12 on: November 25, 2019, 04:26:17 PM »
I have a small but rather sophisticated IMatch app for this purpose. I always wanted to make this a part of IMatch, but never had the time...

The app allows me to create hard/soft (symbolic) links to files in a folder managed by the app.
Basically this means that the folder contains files which physically exist elsewhere on my system. Windows uses that a lot for internal purposes.

Consider a folder

c:\edit

If you now run the command (on a command prompt)

mklink /H "c:\edit\_DSC12345.RAW" "C:\data\my images\2019\06\London\_DSC12345.RAW"

Windows creates a 'virtual' file named _DSC12345.RAW in c:\edit.
But the original file is not copied, this is merely a link to the original file. For Windows and all applications this file looks perfectly normal.
When you open c:\edit\_DSC12345.RAW in an image edit and save it, you actually modify the original file "C:\data\my images\2019\06\London\_DSC12345.RAW".
When you are done, you can just delete the file in c:\edit to break the link.

You can use the same pattern to create links to folders somewhere on your hard disk in another folder.
For Windows Explorer and application it looks as if the folder "c:\somehwere\deep\down\2018\06\01\snaps" actually exists in "c:\edit\snaps".
Very useful at times.

There are some small issues:

1. Usually it works better with hard links (depends on your software).
2. Hard links don't work across drives (you cannot map files from D: to C:)
3. Soft links work, but maybe not with all software.

See this know-how article (written for normal people) for more info: https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

Tip: Use the Copy Data App

IMatch ships with a very versatile app named Copy Data App. You can run it from the IMatch App Manager.
This app allows you to copy arbitrary data for all selected files into the Windows clipboard. What is copied is controlled with IMatch Variables.

If you use this expression in the app:

mklink /H "c:\edit\{File.NameExt}" "{File.FullName}"

and you press Copy Data, IMatch creates mklink commands for all currently selected files. For example:

mklink /H "c:\edit\beach0123.jpg" "c:\data\Mario\Photos\2018\07\Bahamas\beach0123.jpg"
mklink /H "c:\edit\beach05235.jpg" "c:\data\Mario\Photos\2018\07\Bahamas\beach05235.jpg"
...


This example assumes that you want to create the links in c:\edit. Else just adapt the expression.

All you need to do is to run these commands from a command line or place them in a .cmd or .bat file and run it.
You now can access all selected files also in c:\edit - but all changes done to the files will be applied to the original files.





« Last Edit: November 25, 2019, 04:29:51 PM by Mario »

vbt

  • New Members
  • *
  • Posts: 39
Re: Renamer
« Reply #13 on: November 25, 2019, 05:15:15 PM »
I have a small but rather sophisticated IMatch app for this purpose. I always wanted to make this a part of IMatch, but never had the time...

The app allows me to create hard/soft (symbolic) links to files in a folder managed by the app.
Basically this means that the folder contains files which physically exist elsewhere on my system. Windows uses that a lot for internal purposes.

Consider a folder

c:\edit

If you now run the command (on a command prompt)

mklink /H "c:\edit\_DSC12345.RAW" "C:\data\my images\2019\06\London\_DSC12345.RAW"

Windows creates a 'virtual' file named _DSC12345.RAW in c:\edit.
But the original file is not copied, this is merely a link to the original file. For Windows and all applications this file looks perfectly normal.
When you open c:\edit\_DSC12345.RAW in an image edit and save it, you actually modify the original file "C:\data\my images\2019\06\London\_DSC12345.RAW".
When you are done, you can just delete the file in c:\edit to break the link.

You can use the same pattern to create links to folders somewhere on your hard disk in another folder.
For Windows Explorer and application it looks as if the folder "c:\somehwere\deep\down\2018\06\01\snaps" actually exists in "c:\edit\snaps".
Very useful at times.

There are some small issues:

1. Usually it works better with hard links (depends on your software).
2. Hard links don't work across drives (you cannot map files from D: to C:)
3. Soft links work, but maybe not with all software.

See this know-how article (written for normal people) for more info: https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

Tip: Use the Copy Data App

IMatch ships with a very versatile app named Copy Data App. You can run it from the IMatch App Manager.
This app allows you to copy arbitrary data for all selected files into the Windows clipboard. What is copied is controlled with IMatch Variables.

If you use this expression in the app:

mklink /H "c:\edit\{File.NameExt}" "{File.FullName}"

and you press Copy Data, IMatch creates mklink commands for all currently selected files. For example:

mklink /H "c:\edit\beach0123.jpg" "c:\data\Mario\Photos\2018\07\Bahamas\beach0123.jpg"
mklink /H "c:\edit\beach05235.jpg" "c:\data\Mario\Photos\2018\07\Bahamas\beach05235.jpg"
...


This example assumes that you want to create the links in c:\edit. Else just adapt the expression.

All you need to do is to run these commands from a command line or place them in a .cmd or .bat file and run it.
You now can access all selected files also in c:\edit - but all changes done to the files will be applied to the original files.

Thanks for that, it's very clever. I do know a very little about symlinks so I can see what you are proposing. However it won't work in my case for two reasons. Firstly I don't want the edits to change the original files but rather save as new versions, and secondly I want to keep the editor's sidecar files (which I know I should have mentioned previously). If I am "saving as" from within the external editor the new version will be saved in c:\edit using your example rather than c:\data\Mario\Photos\2018\07\Bahamas\. Similarly even if I wished to edit the original image the sidecar file would end up in the wrong place. (I am only using the sidecar created by the external editor to store details of the edit and not keywords etc. I have decided I don't want to try to pass data between programs using the xmp files as I suspect they will get into a mess as I have a tendency to change things often.)

I have thought a little more about my actual need, and think I will be able to work around e.g. in some cases I will just create a new folder and save copies of the images in that folder then I can edit in the external editor. My file names will still be date based so if for any image I wish to find others taken at the same time I can do so. In other cases I will either just do more navigation between folders in the external editor or open/close the editor between ever photo.

Thanks for spending so much time on answering my very specific question.

jch2103

  • Oldtimer
  • ****
  • Posts: 2265
Re: Renamer
« Reply #14 on: November 25, 2019, 05:34:02 PM »
When you drop to Windows Explorer, it copies/moves all the files dragged from IMatch.
Photoshop and ACR open all files. Lightroom switches to the folder of the first (?) file dropped in developer view.
DxO opens only the first file.

No. DxO opens all the files you select and drag to an IMatch DxO Favorite. Very convenient. (It puts the files in a new DxO PhotoLab 'Project'.)
« Last Edit: November 25, 2019, 05:43:48 PM by jch2103 »
John