How to open archives in 7zip File Manager using command line options? - windows

colleges.
I stuck with trying to open zip archive via command line in 7z GUI.
I have found in documentation that
-7z.exe does not have command to open file in new window.
-Also i did not found command line parameters for 7zFM.exe and 7zG.exe
Does anyone know how to solve this problem or make a workaround for my case.
Here described how to use 7z.exe http://sevenzip.osdn.jp/chm/cmdline/ but not any word about opening archive in GUI.
Thanks.

I was able to open a 7zip archive in a new window using the command
7zfm archiveName.7z
Setting 7zFM as the default program to open .7z file extensions will also open the archive in a new window after double-clicking on it.

Related

Katacoda Scenarios not recognizing open command in the terminal

I am learning to create my own scenario in katacoda. I want to open a file that I created in the katacoda editor, but it's not letting me use the open command in my background.sh file. This is what I have in it so far:
touch my-project/new.py
echo "print('Hello World')" >> my-project/new.py
open new.py
This creates the python file, but it does not open it. I tried running open new.py in the terminal, but it gives me an error
bash: open: command not found
I can click on it in the file tree to open it, but I want it to open automatically. What other command can I use to open it in the katacoda editor?
After messaging support, you are not able to put code in a file that is opened on start in Katacoda. You can embed links that will add code when the user clicks on it, but that's a different task. Katacoda does not support the "open" command, but you can use vim or nano.

Command Prompt/Powershell: What Command to Open a non-text file with a Text Editor?

How do I open a non-text file, say server.js, with a text editor (e.g. Notepad) with a command prompt?
I currently use a workaround where I create server.txt, edit it, then rename it to server.js, but it'd be nice to have a more straightforward method.
Thank you in advance!
To open a file which does not have .txt extension in notepad, try
c:\> notepad server.js
Note: You can start also start Visual Studio Code, using commandline with > code <filename>. If the file does not exist, a new file will be created in editor.

Can't open a .chm file from a batch file

I am trying to open a .chm file from a batch file.
The batch file has only this text in it :
echo off
start "S:\G.T.T\GTT-Vandemecum\Help Danny\GTT.chm"
If I run the batch file, the commandline opens but nothing further happens.
If I copy paste S:\G.T.T\GTT-Vandemecum\Help Danny\GTT.chm in start menu/run then it does works.
If I make a shortcut with target "S:\G.T.T\GTT-Vandemecum\Help Danny\GTT.chm" then it also works.
So the command works everywhere, except from a batch file.
What am I doing wrong here ?
It might also be important to know that when I start it from the shortcut, or start menu/runI always get a dialog
We can't verify who created this file. Are you sure you want to open this file ?
I am using Windows 7
EDIT
My problem is not the dialog, my problem is that nothing happens when I open the chm file from a batch file
The Start command is probably seeing your doublequoted string as a title, enter Start /? at the command prompt for its usage information.
Try adding an empty title first:
#Echo Off
Start "" "S:\G.T.T\GTT-Vandemecum\Help Danny\GTT.chm"

7-zip: How to open Add to Archive Dialog Box from command line?

I would like to open 7-Zip Add to archive dialog box from a command line. I believe it is a part of 7-zip file manager (7zFM.ex), but there is no help file.
I need something like:
C:\Program Files\7-Zip>7zFM.exe -dialog "C:\file-to-archive.txt"
You can use -ad switch for 7zg.exe.
7zg.exe a k.7z -ad

7zip command line self extractor not asking for path

I've created my self extracting .exe file from 7zip command line using the
7z a -sfx <name.exe> <filelist...>
commands but when I run this from windows explorer it does not ask me for the location to extract the files to, it just places it inside the current directory.
The target users will not be command line savvy so I don't want them to have to open a prompt and use the command line options to put it in a certain directory.
The non command line 7zip has the functionality I'm looking for when checking the box to Create SFX archive file, But the command line does not seem to have it.
As a last resort I can make a .bat script that will call
7z x -o<location> <name.exe>
But I'm trying to avoid that as the users are used to installing form just the executable.
7z a -sfx7z.sfx <name.exe> <filelist...>
http://sourceforge.net/projects/sevenzip/forums/forum/45798/topic/3777973
It seems that if you 7z from the command line, the resulting exe doesn't prompt. But if you use the 7-Zip File Manage, the exe does prompt you.
I don't know why.
You can use the (slightly dated) modified SFX modules that support prompting for the extracting path.

Resources