Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

File extraction...weirdness...?


  • Please log in to reply
7 replies to this topic

#1 ultranothing

ultranothing

  • Members
  • 7 posts
  • OFFLINE
  •  
  • Local time:09:50 PM

Posted 10 August 2017 - 12:31 PM

Hi! So this is a weird one (to me, perhaps not to my betters):

I have a collection of .ZIP files that are organized into various folders inside of a main folder on my drive. For example:

H:\Documents\July 2012\ABCArchive - July 2012.ZIP
H:\Documents\August 2012\ABCArchive - August 2012.ZIP

And so forth. There are many folders and ZIP archives within this main folder. What I am trying to do is extract each archive into their respective folders to maintain their organization. Because there are so many folders and files, it would be incredibly tedious to go into each folder, right-click each archive and "extract here..."

Each archive has a common string: ABCArchive. My thought was to search within the main folder for "ABCArchive", let the search results populate, select all of the archives at once, right-click and "Extract here" - "here" being, I assume, where the files are actually located.

So that's what I did. WinRAR (and I've also tried this with PeaZIP) chugs along for about two hours and then completes...something...that took two hours. I say this because when I check out any of the folders to ensure the archives were extracted, they were not. The extraction program was obviously extracting the files, but not to the "here" that I assumed it was.

My only idea as to where the files are actually going is the nebulous black hole of the "search results" which is not an actual file location but merely an index of searched files and that perhaps, after the extraction process is complete, the computer decides "yeah, we can't extract these archives here, because here is not a place." 

But here's the other strange part: After the extraction process is complete, it appears that the available space on my drive has been reduced, even though there doesn't appear to be any actual extracted files with which to create a reduction.  Where were those files extracted to?!

I hope this makes sense. I could really use some input on this. Thanks in advance to all who took the time.
 
 

Edited by ultranothing, 10 August 2017 - 07:40 PM.


BC AdBot (Login to Remove)

 


#2 RolandJS

RolandJS

  • Members
  • 4,151 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Austin TX metro area
  • Local time:09:50 PM

Posted 10 August 2017 - 08:22 PM

I have no idea how WinRar works, I use 7-Zip, however, I believe they are similar in some operations.  Apparently like 7-Zip, WinRar has a default directory to which it extracts everything -- unless correctly "educated" as to the new SaveTo should be.  You will have to use something like FileSeek to search for and locate one of those extracted zip files.  I suspect C:\users\[you]...somewhere.


"Take care of thy backups and thy restores shall take care of thee."  -- Ben Franklin revisited.

http://collegecafe.fr.yuku.com/forums/45/Computer-Technologies/

Backup, backup, backup! -- Lady Fitzgerald (sevenforums)

Clone or Image often! Backup, backup, backup, backup... -- RockE (Windows Secrets Lounge)


#3 ultranothing

ultranothing
  • Topic Starter

  • Members
  • 7 posts
  • OFFLINE
  •  
  • Local time:09:50 PM

Posted 11 August 2017 - 09:02 AM

I think...I know what's happening.  

 

So highlighting all of the archives in the search results, right-clicking and then choosing "extract here" doesn't actually do what I thought it did.  It would be GREAT if there were an option in the right-click menu such as "extract each archive where they're located" but I suppose that's a pretty niche kind of need...or maybe not.  Maybe it IS an option and I just haven't figured out how to do it.

Anyway, what I believe is ACTUALLY happening is that when I highlight all of the archives in the search results, right-click and choose "extract here", WinRAR is actually extracting all of the archives into whatever archive I happened to be hovering over when I right-clicked.  

I'll update this when I know for certain.  In the meantime, I'd like to know of an archive extraction program which has the ability to do what I'm trying to do.  If one exists...


Edited by ultranothing, 11 August 2017 - 02:28 PM.


#4 ultranothing

ultranothing
  • Topic Starter

  • Members
  • 7 posts
  • OFFLINE
  •  
  • Local time:09:50 PM

Posted 11 August 2017 - 02:27 PM

So that's not it, either.  I just did a search for all ZIP archives within the main folder and sorted them by size.  If the files were being extracted into whatever archive I happened to be hovering over when I right-clicked and "extract[ed] [t]here", I should be seeing at least a few multi-gigabyte archives in a list of ZIP's that are all only multi-megabytes.  But this is not the case.  All of the archives remain their normal, expected sizes.

 

WinRar has a default directory to which it extracts everything -- unless correctly "educated" as to the new SaveTo should be.  You will have to use something like FileSeek to search for and locate one of those extracted zip files.  I suspect C:\users\[you]...somewhere.

 

 

Yes, I had thought that in my attempts to confuse WinRAR, it would decide to choose its own default directory.  But these files are all on an external 8tb drive (H:) and H: is showing a decrease in available space.  The files are going, seemingly, nowhere that I can find.   



#5 JohnC_21

JohnC_21

  • Members
  • 19,216 posts
  • OFFLINE
  •  
  • Local time:10:50 PM

Posted 11 August 2017 - 02:39 PM

The extracted files could be in a Temp folder. Do a search for ABCarchive or whatever the name is. You can also use WinDirStat to see your hard drive and what is taking up space.

 

https://windirstat.net/

 

I think you are going to have to use a script file in order to do what you want.



#6 ultranothing

ultranothing
  • Topic Starter

  • Members
  • 7 posts
  • OFFLINE
  •  
  • Local time:09:50 PM

Posted 12 August 2017 - 03:38 PM

I've gone through a portion of the folders manually and was able to find where each of the archives (of the many) were extracted to. It appears that if each of the folders (say, 2015's folder) contain 12 additional folders (Jan., Feb., etc.) and each of those folders contain their respective month's ZIP file, that using the search function and extracting the archive from the search results causes WinRAR to extract all of the archives to a random months' folder. There doesn't appear to be, from what I can see so far, any rhyme or reason to which of the folders the extraction program decides to use. 

It's odd to me that "extract here" doesn't actually extract THERE - to where each archive is located, and instead just kinda decides on its' own where HERE is based upon, observably...nothing.



#7 RolandJS

RolandJS

  • Members
  • 4,151 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Austin TX metro area
  • Local time:09:50 PM

Posted 13 August 2017 - 07:37 PM

precisely!  (borrowing from Mr. Wizard in the 60s Tooter Turtle cartoon.)

Seriously, an end-user has to educate any archive utility as to exactly what directory is desired to be the default directory.


"Take care of thy backups and thy restores shall take care of thee."  -- Ben Franklin revisited.

http://collegecafe.fr.yuku.com/forums/45/Computer-Technologies/

Backup, backup, backup! -- Lady Fitzgerald (sevenforums)

Clone or Image often! Backup, backup, backup, backup... -- RockE (Windows Secrets Lounge)


#8 SleepyDude

SleepyDude

  • Malware Response Team
  • 2,583 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Portugal
  • Local time:03:50 AM

Posted 14 August 2017 - 11:50 AM

Hi,

 

Its possible to do that from the Command Prompt using the forfiles command included on Windows to run winrar.

 

Open the Command Prompt and go to the root folder you want to process

cd /d h:\Documents

use forfiles to locate the zip files inside all the folders (recursive) and run Winrar to extract the zip files found

forfiles /M *.zip /s /C "cmd /c start /W \"\" \"c:\program files\winrar\winrar.exe\" x @path *.*"

when extracting If there are files that already exist on the folder you get a prompt to decide what to do...

 

Notes:

- file names or file paths containing spaces must be wrapped in double quotes

- when the command to execute needs quotes they need to be escaped with \" to work inside the /C "..."

 

 

Edit: Running winrar directly from forfiles didn't work for me...

 

Edit2: Added /W to start, it will wait for winrar ends avoiding start several winrar instances at the same time, without waiting it could be a problem when processing a large number of files...


Edited by SleepyDude, 14 August 2017 - 12:24 PM.

• Please do not PM me asking for support. Post on the forums instead it will increases the chances of getting help for your problem by one of us.
• Posts in the Malware section that are not replied to within 4 days will be closed. PM me or a moderator to reactivate.
• Please post your final results, good or bad. We like to know! Thank you!

 
Proud graduate of GeekU and member of UNITE
___
Rui

 
 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users