Hi,
Is it possible to create a button that will move selected files to a directory/path that is specified in the button itself rather than to the path of the target directory?
I tried to add the path after the "cm_RenMov" but I didn't succeed that way.
Thanks in advance!
Button to move files to a specific/fixed directory
Moderators: Hacker, petermad, Stefan2, white
Button to move files to a specific/fixed directory
I'm currently using Total Commander Version 10.00 64bit
Re: Button to move files to a specific/fixed directory
You can use MS-DOS and PowerShell commands.
TC will provide you with parameters for selected files which you can process with DOS and PoSh.
Test this ,
This is an code for to exchange buttons. Select the code and right click at TCs buttonbar.
Select a few files (with and without space) and then click that button. A "DOS-Box" will open and shows the result.
For to copy a few files we need a loop to execute COPY for each file:
ATTENTION: NO error handling, existing files will be overwritten without any warning
Select a few files (with and without space) and then click that button. A "DOS-Box" will open and shows the result on copying the files.
Note that TC adds quotes on its own (by using THIS parameter), IF he detect a space in file name.
There are many possibilities, depending what you wanna do.
The command line length is limited, so for more than a few files use better "%F" / "%L" and a script which parse the so created temp file line-by-line.
Press the [Help]-button in an open button dialog to read more about parameters.
Search the forum or ask for more help.
TC will provide you with parameters for selected files which you can process with DOS and PoSh.
Test this ,
This is an code for to exchange buttons. Select the code and right click at TCs buttonbar.
Code: Select all
TOTALCMD#BAR#DATA
cmd /k
ECHO %S
C:\Windows\system32\cmd.exe
TEST-Button for "ECHO %S"
-1
For to copy a few files we need a loop to execute COPY for each file:
Code: Select all
TOTALCMD#BAR#DATA
cmd /k
?For %%I in (%S) do copy %%I "C:\Temp\kodepr\"
C:\Windows\system32\cmd.exe
TEST-Button für "COPY %S"
-1
Select a few files (with and without space) and then click that button. A "DOS-Box" will open and shows the result on copying the files.
Note that TC adds quotes on its own (by using THIS parameter), IF he detect a space in file name.
There are many possibilities, depending what you wanna do.
The command line length is limited, so for more than a few files use better "%F" / "%L" and a script which parse the so created temp file line-by-line.
Press the [Help]-button in an open button dialog to read more about parameters.
Search the forum or ask for more help.
Re: Button to move files to a specific/fixed directory
As said by Stephan, you do not have any TC comand to move/copy into a specific folder. You can use TCBL it will create a batch file to process all files one by one.
For copy, you can use integration with a copy tool like FastCopy, TerraCopy or RoboCopy. Sample with FastCopy
Another solution is to use a scripting language that will fill automatically the dialog when it show up you will have to create a powerpro,AHK,AutoIt script launch the copy (sending F5 or cm_copy) wait for the dialog and fill the target directory as set in parameter place...
For copy, you can use integration with a copy tool like FastCopy, TerraCopy or RoboCopy. Sample with FastCopy
Code: Select all
TOTALCMD#BAR#DATA
<PATH to>FastCopy.exe
/srcfile_w="%WL" /no_exec /to="<My target Folder>"
<PATH to>\FastCopy.exe,4
FastCopy
C:\tools\FastCopy\
-1
Re: Button to move files to a specific/fixed directory
Sample with TeraCopy
TOTALCMD#BAR#DATA
%Commander_Path%\Addons\TeraCopy_64\TeraCopy.exe
Move *"%WL" --Full path to destination folder--
%Commander_Path%\Icons\bing.ico
TeraCopy Move to --Full path to destination folder--
0
-1
TOTALCMD#BAR#DATA
%Commander_Path%\Addons\TeraCopy_64\TeraCopy.exe
Move *"%WL" --Full path to destination folder--
%Commander_Path%\Icons\bing.ico
TeraCopy Move to --Full path to destination folder--
0
-1
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64