DOS - Unzip + process on a file of one
sempo
-
lami20j Posted messages 21506 Registration date Status Moderator, Security Contributor Last intervention -
lami20j Posted messages 21506 Registration date Status Moderator, Security Contributor Last intervention -
Bonjour,
I'm looking for the DOS command to unzip a .zip file.
I'm also looking for a way to traverse a directory tree from a given directory and process all files with a given extension.
I'm taking the liberty of benefiting from your experiences ;-)
Thank you in advance for any response and have a good day/evening.
Sempo
I'm looking for the DOS command to unzip a .zip file.
I'm also looking for a way to traverse a directory tree from a given directory and process all files with a given extension.
I'm taking the liberty of benefiting from your experiences ;-)
Thank you in advance for any response and have a good day/evening.
Sempo
4 answers
-
There is no DOS command to unzip a file. The Zip format was not native to DOS.
To navigate a directory, you must use the "CD" command, and to list the contents of a directory, you must use the DIR command.
Example: in a DOS window type:
c: "to point to drive C
CD \windows "to point to the Windows directory"
dir "to list all files and directories in Windows"
Dir *.txt "to see only TXT files
CD.. "to go back one level in the hierarchy.
The Help command works depending on the version of DOS. It provides a list of all commands, but you can use it with a command name to get details.
example:
help dir "will give all the details of how this command works. -
I am looking for the DOS command to unzip a .zip file.
You can take the DOS version of InfoZip:
http://www.info-zip.org/pub/infozip/
I am also looking for a way to traverse a directory tree from a given directory and process all files with a given extension.
As a batch file, it might be tricky.
Usually, I program this kind of thing in Python.
But I believe I remember there is an old DOS program (Sweep) that allows you to run a specific program on each file found. -
-