Menu

#2393 7z fails to recognise strings in command line

None
open-rejected
nobody
None
5
2023-06-06
2023-06-06
No

Extracting files with a "-" in filepath (mostly in directories) causes the 7z.exe to fail, ignoring the quotation marks. This happens 10/10 times if the "-" is at the start of the string.

Here's a command prompt from my logs (I can send you the full source code in case you wan't to test it in the same environment):

[META-COMMAND] 7z.exe e "\nas\Denis\Maps\DM-NikotiN-v10-Crennips.zip" "-DM-NikotiN-v10-Crennips\meta.xml" -so

Command Line Error:
Unknown switch:
-DM-NikotiN-v10-Crennips\meta.xml

Discussion

  • Igor Pavlov

    Igor Pavlov - 2023-06-06

    use -- that swicthes off minus character parser.

    7z.exe e  -so -- a.zip "-DM.xml"
    
     
    👍
    1
  • Igor Pavlov

    Igor Pavlov - 2023-06-06
    • status: open --> open-rejected
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB