Page 1 of 1
Testing this command, error when using %P
Posted: 2024-11-14, 16:26 UTC
by xxxdo1
This command copies the selected files to the target panel folder. it can be run.
cmd=%COMSPEC% /c
param=for %%i in (%P%S) do xcopy %%i "%Tbackup_%|$DATE:Y-M-D_h·m·s|\" /s /e /h /y
Replace %T with %P, it will fail
cmd=%COMSPEC% /c
param=for %%i in (%P%S) do xcopy %%i "%Pbackup_%|$DATE:Y-M-D_h·m·s|\" /s /e /h /y
Re: Testing this command, error when using %P
Posted: 2024-11-15, 03:36 UTC
by Fla$her
The choice of section is unclear. The /e and /s options are not needed for selected files.
Code: Select all
TOTALCMD#BAR#DATA
%comspec% /q/c for %f in
("%S") do xcopy/chkqry %%f "%Pbackup_%|$DATE:Y-M-D_h·m·s|\"
wcmicon2.dll,62
Copy selected files to backup_Y-M-D_h·m·s\
1
But it's better this way:
Code: Select all
TOTALCMD#BAR#DATA
cm_Copy /BGO5PST="backup_%$DATE:Y-M-D_h·m·s%\"
wcmicon2.dll,62
Copy selected files to backup_Y-M-D_h·m·s\
Re: Testing this command, error when using %P
Posted: 2024-11-15, 10:22 UTC
by xxxdo1
2Fla$her
Thanks, your method is better. I've learned a lot.
I have a question, why can't "for %f in" be put in param?
Re: Testing this command, error when using %P
Posted: 2024-11-15, 11:02 UTC
by Fla$her
2xxxdo1
You're welcome.
This is done to get more text into the command, as %S can take up a lot of space.
Re: Testing this command, error when using %P
Posted: 2024-11-15, 11:16 UTC
by xxxdo1
2Fla$her
Why I put "for %f in" into param, it will fail,
Re: Testing this command, error when using %P
Posted: 2024-11-15, 11:20 UTC
by Fla$her
%%f
Re: Testing this command, error when using %P
Posted: 2024-11-15, 11:22 UTC
by xxxdo1
2
Fla$her
Oh, I am blind.
