ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > PublicDomainVic

Extract Archives Within Each Relevant Sub-Folder

(1/1)

nkormanik:
Suppose the following:

Overall Parent Folder: Various

Sub-Folder 1:
1001.part1.rar
1002.part2.rar

Sub-Folder 2:
2001.part1.rar
2002.part2.rar
2003.part3.rar

...

Sub-Folder 99:
9901.part1.rar
9902.part2.rar

I would really, really like to find a way to automatically recursively travel throughout the overall initial parent folder, into each sub-folder, and extract each set of archives therein to that relevant sub-folder.

Any suggestions greatly appreciated.

Thanks!
Nicholas Kormanik

tomos:
This one sound similar and could be modified if necessary:
I wrote a AHK script for myself once + integrated it in 2xplorer. So I just click a button and all archives in the folder get unpacked. Perhaps it's of use for you? It unpacks all archives in a folder in a subfolder (archive-name).

Installation: paste code in notepad, edit the second line pointing to winrar.exe, save as whatever.ahk, install authotkey (autohotkey.com)

Usage: Copy sourcefolder in clipboard and launch the script, or pass the sourcefolder as first parameter. An optional second parameter would be a targetfolder (where to place unpacked files).
-wr975 (September 19, 2006, 05:58 AM)
--- End quote ---

It's pretty old though, I know AHK got a major update at some stage...

4wd:
Any suggestions greatly appreciated.-nkormanik (June 12, 2022, 08:54 PM)
--- End quote ---

Learn a scripting language.


--- Code: PowerShell ---Get-ChildItem .\test\* -include *.part1.rar -Recurse | % { .\7z.exe x $_ -o"$(Split-Path $_ -Parent)"}

nkormanik:
@tomos and @4wd  Thanks!

On "scripting," any comments as to what you have found to work well in most of the cases you've encountered?

Autohotkey, Powershell, Python....  C#??

4wd:
C# isn't a scripting language.

I'd go with anything that's cross-platform, eg. PowerShell, Python, etc.

Navigation

[0] Message Index

Go to full version