Hello. I am trying to create a script that recursively looks at my folder structure, and extracts any .7z files that have not already been extracted yet. I know that all .7z files only have a single .txt file in them, and the only .txt file in any directory would be from that .7z file.
I am using 7-zip to extract all of the .7z files.
Here is an example directory structure.
In this example, you can see that within Subfolder 2, the .7z file has not been unzipped, while it has within Subfolder 1. The Folder names and 7z names are variable, along with the depth of the directories.
Here's what I have so far, but I think I'm on the wrong track. So far I have a script that lists all folders that include a .7z file, but I can't figure out the rest. If you have a more efficient solution, I am completely open to it.
Pamu - That gets me about halfway where I want to be. This is definitely more efficient, so thanks!
The goal is to look into each folder with a .7z file. If that folder with the .7z also includes a .txt file, skip it. If it does not, then unzip the .7z file (which only includes a single .txt file) into that same folder.
I have .zip file, i want to list all the files archived in the zip file. unzip utility is not working for me in unix.
Please help me resolve this issue
Thanks
ganesh. (3 Replies)
Hi Expert,
We have some shell scripts which Internally uses Perl Script to Unzip the source zip files which comes to inbound directory. So now our requirement is to avoid the dependency on Perl Script and us Shell Script to unzip the files. I have the Perl script with me attached can some one... (3 Replies)
I have a batch of mkv video files I would like to transcode to a more compressed format. After spending a significant amount of time experimenting with various parameters I think I have found the handbrake settings that give the best compromise. I now want to construct a simple bash script... (4 Replies)
My script works like this.
1. First for loop - checks if it can access zip parameters in a directory
2. If unzip fails for any of the file in that directory, then it goes inside the second for loop - to list which file is that
3. My doubt is..Is there any way I can tell status for every 5000... (17 Replies)
Hi,
Can someone help me with creating a bash shell script.
I need to create a script that gets a positive number n as an argument.
The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Hi All
I have ftped a .ZIP file (zipped using WinZip in Windows) to my Unix server (HP-UX).
I don't have unzip cmd available in my curent Unix version
Please let me know any cmd in UNIX (other than unzip) using which I can unzip this .ZIP file .
Please elaborate on the commands aval and... (5 Replies)
All, I'm having 4 .zip files that are coming from FTP. I need to unzip those files and put that files into another folder. Can anyone help me how to write a shell script to check wether .zip files are located in FTP folder, if condition true then how to unzip and put it in another folder. Thanks in... (2 Replies)
I'm trying to create a script that allows me to determine all the pid's that spawned from an original process(ie - who's running this command)....
I've created a script that searches the processes running based on an argument passed the script. It then is to get the parent pid and look that... (3 Replies)
Hi All
I have ftped a .ZIP file (zipped using WinZip in Windows) to my Unix server (HP-UX).
I don't have unzip cmd available in my curent Unix version
Please let me know any cmd in UNIX (other than unzip) using which I can unzip this .ZIP file .
Please elaborate on the commands aval and... (5 Replies)
Hi
I have searched usr/bin and usr/sbin to try to find unzip but I cannot find it.
My script is using the ksh #!/usr/bin/ksh but when I rsh to another box it cannot find unzip to unzip to a new archive, but I can unzip files when I am using a telnet session on the box.
The error message... (4 Replies)