7zip Incorrect Command Line Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers how to use 7zip from command line or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x run 7zip from command line Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only
7z Windows Command Line Examples
takes a minute: Sign up 7zip incorrect command line error? up vote 1 down vote favorite Following the syntax guide here: http://sevenzip.sourceforge.jp/chm/cmdline/switches/update.htm The following code should be correct - at least it looks syntatically correct. But when I run it
7zip Cmd
I get the error "incorrect command line" - meaning a syntax error. Does anyone know what is wrong with this? I am using 7zip version 9.20. 7z u H:\archive.7z -up0q3r2x2y2z1w2!H:\update-february.7z compression 7zip archiving share|improve this question asked Feb 14 '15 at 0:58 aaronmcavinue 578 shouldn't it archive the files from the current directory? –aaronmcavinue Feb 14 '15 at 2:06 My understanding is that 7zip automatically archives all the files from the current directory in the command 7 zip shell commands line. If this is wrong, can you please provide info on how to correct it? –aaronmcavinue Feb 14 '15 at 15:21 I recheck this with 7zip 9.20 (both: x86 and x64). Yes, it does not require to specify files to archive. But your command line work fine for me without any error. –PetSerAl Feb 15 '15 at 14:17 alright thanks Ill look into it further. –aaronmcavinue Feb 16 '15 at 1:25 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted Try to add "endlocal" before 7z command: endlocal 7z u H:\archive.7z -up0q3r2x2y2z1w2!H:\update-february.7z The error was due to ! in 7z command line, when used setlocal enabledelayedexpansion share|improve this answer edited Oct 4 '15 at 17:03 Racil Hilan 8,44481936 answered Oct 2 '15 at 0:55 Ray D 262 sideshowbarker, I added recommendation in answer, now is ok? –Ray D Oct 2 '15 at 14:50 Yeah, looks better. –sideshowbarker Oct 2 '15 at 18:39 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged compression 7zip archiving or ask your own ques
home cookingPicturesA Walk on the Pequest FillAutumn in the GapBroken Pipe(dreams)Calno to Wallpack CenterChesapeake Cruise June 2008FJ CruisingIron Road to ChesterMillbrook Village and Mountain RoadOBX AdventureOld Dingmans and Sand Pond RoadsThe Depue and Kinney FarmsThe Lehigh and Hudson RRThe Orchard Trail and Ridge RoadThe Paulins Kill
7z Silent
ViaductThe Vancampen Burial Ground November 15, 2009November 15, 2009 7-zip Incorrect Command Line Opening incorrect command line 7zip rar RARs Ok, this one has been driving me nuts for a couple of weeks now, ever since I rebuilt my system and installed 7zip command line install Windows 7 64-bit. I have been using 7-zip for years, and kept on using it long after Windows gained excellent in-shell support for .ZIP folders, because 7-zip handles RAR, TAR and other formats, and unlike WinRAR http://stackoverflow.com/questions/28511235/7zip-incorrect-command-line-error it's free and open source. However, after installing it on the 64-bit edition of Windows 7 I consistently got an "Incorrect Command Line" error trying to open RAR archives by double-clicking them in Explorer. If I right-clicked the archive and selected 7-zip -> Open Archive it worked fine. Not a big deal, but I'm the kind of guy to be bothered by this stuff until I get it fixed. Today I noticed http://www.markbetz.net/2009/11/15/7-zip-incorrect-command-line-opening-rars/comment-page-1/ something interesting. If I right-clicked the file and chose Open With -> 7-zip GUI, I got the same error. However if I right-clicked and chose Open With -> 7-zip File Manager it worked fine, and got me to the archive folder view I wanted. For those of you not familiar with the different versions of 7-zip that come in the default install, there are three: 7-zip Console, 7-zip GUI, and 7-zip File Manager. Now I don't understand exactly how 7-zip GUI differs from File Manager, but I'll go out on a limb and assume it's a GUI view of a single archive, rather than an Explorer-like Window in which you can navigate to different folders. Whatever. All that matters to me is that when I went into Control Panel -> Default Programs -> Associate a file type or protocol with a program, selected the .rar file extension, and clicked Change Program I was able to choose 7-zip File Manager as the default, and from that point onward it worked as it should. Tada! Tweet Notes & Asides, Technology36 Comments Post navigation ← Picky, Picky QAMplexity → 36 thoughts on “7-zip Incorrect Command Line Opening RARs” Mist September 9, 2010 at 11:22 am Thanks so much! You just helped me fix some pretty co
here for a quick overview of the site Help Center Detailed answers to any questions you might http://superuser.com/questions/763342/7z-in-batch-file-with-variables-incorrect-command-line have Meta Discuss the workings and policies of this site About http://serverfault.com/questions/55055/get-error-incorrect-command-line-when-trying-to-extract-7zip-archive-on-linux Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; command line it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top 7z in batch file with variables “Incorrect command line” up vote 0 down vote favorite I'm trying to run the following batch file: set HH=%time:~0,2% set incorrect command line HH=%HH: =0% IF %time:~0,2% GTR 5 ( IF %time:~0,2% LSS 21 ( FOR /F "TOKENS=1 DELIMS=:" %%A IN ('TIME/T') DO SET HH=%%A XCOPY "D:\Sage RAM Image\Sage Data" C:\Sage-Incremental-Backup\sage-%date:~-4,4%-%date:~-7,2%-%date:~-10,2%-hour-%HH% /D /Y /E /R /K /C /H /I "C:\Program Files\7-Zip\7z.exe" -a -pXXXX C:\Sage-Incremental-Backup\sage-%date:~-4,4%-%date:~-7,2%-%date:~-10,2%-hour-%HH%\sage-backup.zip C:\Sage-Incremental-Backup\sage-%date:~-4,4%-%date:~-7,2%-%date:~-10,2%-hour-%HH%\* EXIT /B 0 ) ) But it keeps giving me the error "Incorrect command line". I think it might have something to do with the date variables, as they work fine in normal XCOPY operations. Where is it wrong? When echoing the line I get: "C:\Program Files\7-Zip\7z.exe" -a -p3uropeaN1 C:\Sage-Incremental-Backup\sage-2 014-06-10-hour-07\sage-backup.zip C:\Sage-Incremental-Backup\sage-2014-06-10-hou r-07\* windows-7 backup batch batch-file 7-zip share|improve this question edited Jun 10 '14 at 6:06 asked Jun 4 '14 at 5:20 imperium2335 1012 The value set to the variable HH on the second line seems wrong. Why are you assigning a value to the HH variable and changing it back immediately in the next line? –Chirag Bhatia - chirag64 Jun 4 '14 at 5:22 Put echo in
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top get error “incorrect command line” when trying to extract 7zip archive on linux up vote 2 down vote favorite 1 I copied a large zip file to a Linux server, I didn't realise at the time that it was a 7zip file. After some messing around I installed 7zip with "yum install p7zip" however when I try to extract the archive with 7za -x ./myarchive.zip I get the following output 7-Zip (A) 4.61 beta Copyright (c) 1999-2008 Igor Pavlov 2008-11-23 p7zip Version 4.61 (locale=C,Utf16=off,HugeFiles=on,1 CPU) Error: Incorrect command line Google is not my friend with this error, so I thought that I would try here. Debated as to if this should be SF or SU, but as it is not my computer I think it is SFs' domain. linux compression share|improve this question asked Aug 17 '09 at 15:20 Jeremy French 3473723 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote accepted Are you sure it takes the "-x" and not just "x"? And why is the file a .zip instead of the 7zip extension ".7z"? share|improve this answer answered Aug 17 '09 at 15:25 Bart Silverstrim 28.7k84979 that was it, thanks. –Jeremy French Aug 17 '09 at 15:32 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged linux compression or ask your own question. asked 7 years ago viewed 7005 times active 7 years ago Related 4Store file in zip archive with different name (linux command shell)-1Good self-ex