Code: Select all
Main folder\1\A\a.rar
Main folder\2\c.rar
Main folder\3\B\B.zip
And then alt+F9
I left "Unpack n file(s) to " empty
But I get error "Access denied a\"
Then how can I solve this problem.
Moderators: Hacker, petermad, Stefan2, white
Code: Select all
Main folder\1\A\a.rar
Main folder\2\c.rar
Main folder\3\B\B.zip
Code: Select all
"%L" "%P" "%T"
Code: Select all
@echo off
setlocal enabledelayedexpansion
rem Button Parameters "%L" "%P" "%T"
set tc_lst=%1
set tc_src=%2
set tc_dst=%3
rem Make sure the path is correct
set sevenZipExe=%COMMANDER_PATH%\Tools\7-Zip\7z.exe
if -%3==- echo First parameter must be filelist path, second and third - source and target path. && pause && goto :EOF
for /F "usebackq delims=" %%I in (%tc_lst%) do (
"!sevenZipExe!" x "%%I" -o"%%~dpI"
)
endlocal
My set is as follows:ZoSTeR wrote:1. Get "7z.exe" and "7z.dll" from the installation folder of 7-Zip and put... button
Code: Select all
echo "!sevenZipExe!" x "%%I" -o"%%~dpI"
I edit the code:ZoSTeR wrote:To debug replace "cmd /c" with "cmd /k"
and put an "echo " before "!sevenZipExe...I don't know how well unicode file names are handled...Code: Select all
echo "!sevenZipExe!" x "%%I" -o"%%~dpI"
Code: Select all
cmd.exe /K ""C:\Program Files\TotalCMD64\Unpack_inplace.cmd""
Code: Select all
'"C:\Program Files\TotalCMD64\Unpack_inplace.cmd"" "C:\Users\yuyuxuan\AppData\Lo
cal\Temp\CMD783.tmp" "" "C:\' is not recognized as an internal or external comma
nd,
operable program or batch file.
C:\Program Files\TotalCMD64>
Code: Select all
cmd /k "C:\Program Files\TotalCMD64\Unpack_inplace.cmd"
If I move the double quotes into one quote. It will get error, like that:ZoSTeR wrote:Just use. Don't use double quotes.Code: Select all
cmd /k "C:\Program Files\TotalCMD64\Unpack_inplace.cmd"
Code: Select all
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
C:\>
Code: Select all
""c:\
Code: Select all
'c:\
Code: Select all
"c:\
Yes, I use double quotation marks instead of two single quotation marksZoSTeR wrote:Just use normal quotes.
NeithernorCode: Select all
""c:\
but these:Code: Select all
'c:\
Code: Select all
"c:\
Code: Select all
"%COMMANDER_PATH%\Unpack_inplace.cmd"
Code: Select all
cmd.exe /K ""C:\Program Files\TotalCMD64\Unpack_inplace.cmd""
Code: Select all
help cmd
Code: Select all
If /C or /K is specified, then the remainder of the command line after the switch is processed as a command line, where the following logic is used to process quote (") characters:
If all of the following conditions are met, then quote characters on the command line are preserved:
no /S switch
exactly two quote characters
no special characters between the two quote characters, where special is one of: &<>()@^|
there are one or more whitespace characters between the two quote characters
the string between the two quote characters is the name of an executable file.
Otherwise, old behavior is to see if the first character is a quote character and if so, strip the leading character and remove the last quote character on the command line, preserving any text after the last quote character.
Code: Select all
if -%3==-
Code: Select all
cmd.exe /K ""C:\Program Files\TotalCMD64\Unpack_inplace.cmd""
Code: Select all
cmd.exe /K ""C:\Program Files\TotalCMD64\Unpack_inplace.cmd"" "%L" "%P" "%T"
Code: Select all
cmd.exe /K ""C:\Program Files\TotalCMD64\Unpack_inplace.cmd" "%L" "%P" "%T""
Code: Select all
if -%3==-
Code: Select all
if -==-
Code: Select all
if -ContentOfParam==-
Code: Select all
if X%3==X
Thank you for solving my problem.ZoSTeR wrote:I checked again and you're right about double quoting when using cmd.exe and not just the cmd file.
The linegives you an error because the parameters are added. So its basicallyCode: Select all
cmd.exe /K ""C:\Program Files\TotalCMD64\Unpack_inplace.cmd""
which is wrong.Code: Select all
cmd.exe /K ""C:\Program Files\TotalCMD64\Unpack_inplace.cmd"" "%L" "%P" "%T"
......[/code]
orThe lineCode: Select all
if -ContentOfParam==-
would do the same.Code: Select all
if X%3==X
ZoSTeR replaced his % parameter with either "" or "ContentOfParam" as the interpreter would do....sticazzi wrote:gulp gulp, I've never seen this syntax ("-==-"): could you give me more info (web page, etc.)? I don't find any info about it
![]()
Many thanks