Copy the name and/or path of selected files

Get help for specific problems
Posts: 7
Joined: 29 Sep 2024

vbn

I would like to copy the name of the selected files (and some other data) from the Overview panel. The right-click menu of the selected file(s) would be a meaningful place to have commands like these but unfortunately, they are not there:

- copy filename
- copy filename with full path
- copy filename with relative path (relative to the folder that I selected for comparison)
- copy directory of the file with full path
- copy directory of the file with relative path

Are these functions somewhere else or do they not exist? If they don't, can I ask for this feature, please?

(I would need the full path of the selected file for pasting it into the command line, etc.)
User avatar
Posts: 2410
Joined: 22 Aug 2012

Plerry

The only possibility I see would be to run a Compare, and then in the main menu use
Tools / Export file list
Posts: 7
Joined: 29 Sep 2024

vbn

Yep, this is what I also found.

Therefore, it seems that the feature I asked for is not a "where is this feature?" question but more like a "can I get this feature, please?" question.
User avatar
Posts: 3953
Joined: 11 Jun 2019

xCSxXenon

This could be done by creating some small batch scripts and having them called using the "custom context menu" options in FFS. This is interesting... I may dive into this on my own. I will of course provide a solution if I do create it!
User avatar
Posts: 3953
Joined: 11 Jun 2019

xCSxXenon

- copy filename
- copy filename with full path
- copy filename with relative path (relative to the folder that I selected for comparison)
- copy directory of the file with full path
- copy directory of the file with relative path vbn, 29 Sep 2024, 10:58
- DONE
- DONE
- NOT DONE
- DONE
- NOT DONE

The two that are not done are the ones that are requesting a relative path. I looked through both of these:
https://freefilesync.org/manual.php?topic=external-applications
https://freefilesync.org/manual.php?topic=macros
I did not find a documented macro that would provide this. I swear I've heard of a macro that gives you the path of the left/right. That could probably be used in combination with a full path to obtain the relative path. Or @Zenju could graciously add the macro(s) to get it directly
User avatar
Posts: 3953
Joined: 11 Jun 2019

xCSxXenon

I've attached the three batch scripts that I have working so far. Here is a picture of my custom context menu settings in FFS also:
2024-10-01 17_33_39-Options.jpg
You will have to edit the commands to match wherever you store the scripts, of course. Here is the plaintext entries for easier copy-pasting:
Copy Directory Path
"J:\OneDrive\PC\Batch Files\FFS\Copy Directory Path.bat" "%parent_path%"
Copy File Name with Path
"J:\OneDrive\PC\Batch Files\FFS\Copy File Name with Path.bat" "%item_path%"
Copy File Name
"J:\OneDrive\PC\Batch Files\FFS\Copy File Name.bat" "%item_name%"
NOTE: When FFS calls these commands, no CMD window will show up! This tripped me up while testing since I was expecting the script to show up visually as if I ran it manually.

NOTE #2: Never trust random scripts from strangers on the internet! Right-click on the batch scripts and click 'edit' to see what they contain. They are very simple
You do not have the required permissions to view the files attached to this post.
Posts: 1006
Joined: 8 May 2006

therube

Shouldn't Open with default application be something like:

START "" "%item_path%\%item_name%"

(I didn't test that.)
User avatar
Posts: 3953
Joined: 11 Jun 2019

xCSxXenon

Shouldn't Open with default application be something like:

START "" "%item_path%\%item_name%"

(I didn't test that.) therube, 02 Oct 2024, 15:22
I'm guessing not because that's the default set by Zenju and it works ¯\_(ツ)_/¯
Posts: 7
Joined: 29 Sep 2024

vbn

Thank you, xCSxXenon, I will try it as soon as I need it the next time. I really appreciate your efforts.