Menu

7zip special command line

2017-07-15
2017-07-31
  • Georgie Ferraro

    Georgie Ferraro - 2017-07-15

    Hi! I am first time on SourceForge and I hope I am on the right place and somebody can help me.

    So I have tons of Zip files, each of them contain a file (always the same *.nfo file) ,
    they must be removed.

    I have already a syntax, it works fine, but this is unfortunately only for one file, I could do it ca. 16000 times, but I know there is surely a solution for multiple files (which are themselves grouped in sub-directories).

    The basic command line is :

    7z d -r archive.zip *.nfo

    I tried around for hours without success....
    Thx in advance
    Georgie

     
  • YoYo Kenny

    YoYo Kenny - 2017-07-28

    Have you tried this:

    7z d *.zip *.nfo -r

     

    Last edit: YoYo Kenny 2017-07-28
  • Georgie Ferraro

    Georgie Ferraro - 2017-07-31

    No success:(

    but thx for the try

     
  • Georgie Ferraro

    Georgie Ferraro - 2017-07-31

    If somebody knows, how can I reach (in E-mail) Mr. Igor Pavlov, the creator of 7zip,
    that would be also a great help. He could surely help me in this command line.

     
  • Vladimir Surguchev

    for /r %z in (*.zip) do 7z d -r "%z" *.nfo

     

    Last edit: Vladimir Surguchev 2017-07-31
  • Georgie Ferraro

    Georgie Ferraro - 2017-07-31

    Thanks, but how can I use this parameter?

     
  • Vladimir Surguchev

    It is command line (cmd.exe) syntax to call 7z for each .zip file from the current folder. So:
    1) Start Command Prompt
    2) Change directory to your path (for example: cd /d D:\Your\Archives)
    3) Execute command: for /r %z in (*.zip) do 7z d -r "%z" *.nfo

     

    Last edit: Vladimir Surguchev 2017-07-31
  • Georgie Ferraro

    Georgie Ferraro - 2017-07-31

    Now it worked!!!

    Thank You so much!

    Thank You!

     

Log in to post a comment.