Print Page | Close Window

external execute problem

Printed From: MetaCase
Category:
Forum Name: MetaEdit+
Forum Description: All topics relating to MetaEdit+ or DSM
URL: https://www.metacase.com/forums/forum_posts.asp?TID=912
Printed Date: 27.Mar.2026 at 06:14
Software Version: Web Wiz Forums 12.05 - http://www.webwizforums.com


Topic: external execute problem
Posted By: edward22243
Subject: external execute problem
Date Posted: 19.Jul.2019 at 13:16
I want to unzip a program and in the commandline of Windows this works:

cmd /c """D:\Program Files\7-zip\7z.exe"" x -o""D:\Infraflex CAD\jajaja"" ""D:\Infraflex CAD\wisme\small_project.zip"""

but:

external 'cmd /c """D:\Program Files\7-zip\7z.exe"" x -o""D:\Infraflex CAD\jajaja"" ""D:\Infraflex CAD\wisme\small_project.zip"""' executeBlocking

does not work. MetaCase does not give any response.

When I change it to: 
external 'start cmd  /c " ""D:\Program Files\7-zip\7z.exe"" x -o""D:\Infraflex CAD\jajaja"" ""D:\Infraflex CAD\wisme\small_project.zip"""' executeBlocking
it does give me an error, it says it cannot execute it.

Could someone point me in the right direction to be able to extract zip via MERL?

Greetings, Edward



Replies:
Posted By: edward22243
Date Posted: 19.Jul.2019 at 13:25
Disregard the message I sent please.

 I tested the commands in Powershell and there it works, the same command in cmd should be different. The "" (double quotes) should be replaced by " (one quote) and then it works in cmd , and consequently it works also within external .. executeBlocking. 


Posted By: stevek
Date Posted: 19.Jul.2019 at 13:52
Great that you already spotted the problem in your command line, and got it working! 

You can also drop the cmd /c (which isn't needed for actual executables like 7z.exe):

external '"D:\Program Files\7-zip\7z.exe" x -o"D:\Infraflex CAD\jajaja" "D:\Infraflex CAD\wisme\small_project.zip"' executeBlocking

If you use Microsoft's start command (not needed here), note that it is fussy about double quotes: if your first argument is quoted, it will interpret it as a window title instead of a command, so add an extra double-quoted window title before the real argument.


Posted By: edward22243
Date Posted: 21.Jul.2019 at 19:48
Thanks for the reply. Dropped the cmd /c because indeed it is not required.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.05 - http://www.webwizforums.com
Copyright ©2001-2022 Web Wiz Ltd. - https://www.webwiz.net