Just tried it using archives with folders and archives without folders. Both worked.
By the way, thank you very much SeldomGood. Had no idea -o* was a thing. And it even supports inserting a couple of sub directories in there too, like -oa/b/c/d/*
Last edit: Ferneu 2023-11-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use command line version of 7zip - 7za.exe. Pls tell me how can I extract archive in to folder like the name of archive file. For example:
extract archive 02.10.2007boss.7z to /02.10.2007boss/file.txt
The manual is your best friend.
Check the "-o" switch.
To Igor Pavlov: it may be worth pointing out in the manual page for "-o", that using it with wildcard works, maybe with a simple example like:
7z x archive.zip -o*
Regards
You are right! Wonderfull Switch :). I would tell magic switch! But from a management it is not obvious :).
[quote]
-o (set Output directory) switch
Specifies a destination directory where files are to be extracted.
This switch can be used only with extraction commands.
Syntax
-o{dir_path}
{dir_path}
This is the destination directory path. It's not required to end with a backslash.
Example
7z x archive.zip -oc:\Doc
extracts all files from the archive.zip archive to the c:\Doc directory.
[quote]
Many thanks for the help!
hey seldom god, i couldnt get the wildcard to work with
-o
. It threw following error when run into a folder with no subfolders.Is it normal wildcard and requires a folder to be there? I thought that it would automatically apply the package name to folder.
Just tried it using archives with folders and archives without folders. Both worked.
By the way, thank you very much SeldomGood. Had no idea
-o*
was a thing. And it even supports inserting a couple of sub directories in there too, like-oa/b/c/d/*
Last edit: Ferneu 2023-11-03