Small Gathering/Exporting utility needed...

  • Thread starter Thread starter Nunya Bizniss
  • Start date Start date
N

Nunya Bizniss

Looking For.
A small freeware utility to gather ALL parameters from zipped archives on a
hard drive partition and dump them into a single file (CSV perhaps?) that I
can then use to import into Access.

Parameters.
Filename, Size, Date, Location. All files are zipped compressed archives.

Files stored under three paths, drives D: E: H: no subdirectories under
containing path.
Output required, one M$ Access Table with corresponding fields.

Object.
To rationalise a lot of stored files in three locations and remove
duplicates (and old versions) with a single searchable database. There are a
lot of them!

Any suggestions appreciated to save (automate?) the process. T.I.A.
 
i'm not quite clear... you want those details for the zip files themselves,
or for every file that is stored in each zip file?

jack
tomorrow's almost over, today went by so fast...
 
I'm not quite clear... you want those details for the zip files themselves,
or for every file that is stored in each zip file?

Not for the contents of the zip archives, just the archives themselves. Each
archive treated as a file - I know what's in them.
 
I'm not quite clear... you want those details for the zip files themselves,
or for every file that is stored in each zip file?
Not for the contents of the zip archives, just the archives themselves. Each
archive treated as a file - I know what's in them.

Try using the DIR command from a command window, redirected to a file.

Something like
dir d:<path>\*.zip/s > list.txt
dir e:<path>\*.zip/s >> list.txt
dir h:<path>\*.zip/s >> list.txt

list.txt will have the 3 directory listings for all *.zip files in
those 3 paths, one after the other.
 
ok, this does it. well, it does for me :)

this is an autohotkey script, so you'll need autohotkey from
www.autohotkey.com in order to run it. alternatively, i can compile it to
an exe for you, but if you have the source you can tweak it as required.


/*
get the following for all zip files on the current disk:

Filename, Size, Date, Location.

date format used is YYYYMMDDHH24MISS
file size is in KB

save the output to a file chosen by the user

*/

; get disk to search for zip files
Inputbox targetdisk, Get zip file info, Which disk you want to search?

; trim off whitespace from disk letter
targetdisk = %targetdisk%

; assume first char is now disk letter, so grab it
stringleft targetdisk, targetdisk, 1


FileSelectFile, outputfile, 10, , Append output to file, Text Documents
(*.txt; *.log; *.tsv)

; abort if no output file selected
if outputfile =
{
MsgBox, No file selected.
exit
}


count = 0 ; counter for number of zip files we find

; write out header info to file
FileAppend Filename%A_TAB%Size (KB)%A_TAB%Date
(YYYYMMDDHH24MISS)%A_TAB%Location`n, %outputfile%

; loop through all zips, files only, recurse
loop %targetdisk%:\*.zip, 0, 1
{

; save info about each zip we find
FileAppend
%A_LoopFileName%%A_TAB%%A_LoopFileSizeKB%%A_TAB%%A_LoopFileTimeModified%%A_TAB%%A_LoopFileDir%`n,
%outputfile%
count++ ; increment counter
}

MsgBox 0, Get zip file info, Finished`n`nInfo about %count% zip files saved
to:`n%outputfile%
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top