Is possible to use substrings in User Menu comands?

This is a place for users to discuss Altap Salamander. Please feel free to ask, answer questions, and express your opinion. Please do not post problems, bug reports or feature requests here.
rff1990
Posts: 1
Joined: 07 Jul 2024, 16:56

Is possible to use substrings in User Menu comands?

Post by rff1990 »

Hello all,

I've trying to find some information about it but without any success.
What I'm trying to do is xcopy files from one folder to another folder. I'm using xcopy to only copy what's changed, like that:

Code: Select all

xcopy C:\source X:\destination /s /d
Simple to do in user menu. But what I want is to replace part of the $(Fullname) variable, something like that:

Code: Select all

xcopy C:\source_path\parent_folder\folder_to_copy  X:\Destination_Path\folder_to_copy /s /d
Change C:\source_path\parent_folder\ to X:\Destination_Path\ and keep the rest the same.

When renaming files in Salamander, I can use substrings, so I could select only the file name part I want for the second argument, but the same syntax doesn't work in user menu. Is this possible to achieve?

Thanks in advance.
User avatar
AD7
Posts: 586
Joined: 28 Jan 2006, 16:21

Re: Is possible to use substrings in User Menu comands?

Post by AD7 »

Open source and target folders in panels and use variables that contains what you need.

Or,
create an simple Automation script where you can change the source path accordingly (and the destination path does not need to be opened in a second panel).
Post Reply