Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book General > General Discussions

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2016, 08:45 AM   #1
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
Wanted: Bulk automatic archival program for the PC?

Anyone know of an archival program for Win 8.1 that allows automatic, bulk archiving of all sub-folders and their contents, naming the resulting archive based on the sub-folder's name?

I would like to be able to set a starting directory and have the program walk the directory tree downward, adding all contents until it reaches the end. Going back to the top, it should do the same to all the other folder's in the starting directory. Here is a sample of what I mean.

Code:
Directory Structure                         Output
----------------------                      ------------------
C:\User\Docs\                               [none, starting directory]
    Folder1\                                Folder1.RAR
        Page 01
        Page 02
    Folder2\                                Folder2.RAR
        Page 01
        Page 02
        Folder3                             [none, part of Folder2.RAR]
            Page 01
            Page 02
This will allow me to create simple ebooks by placing the individual "pages" (mostly images) into a container (the archive) that I can later manipulate into a better form. The focus of this effort is in automatically creating the archive file.
Sabardeyn is offline   Reply With Quote
Old 01-18-2016, 09:35 AM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Batch file.

Code:
cd /User/Docs/
for i in */; do
    tar -czvf $i.tar.gz $i
done
There is the logical flow in unix bash, 'fraid you're on you own in converting to MS batch files.
Also investigate the WinRar cli syntax, if it has a cli backend that is -- but why oh why do you want to use RAR compression?
It is proprietary and not very interoperable.

Last edited by eschwartz; 01-18-2016 at 09:40 AM.
eschwartz is offline   Reply With Quote
Advert
Old 01-18-2016, 02:07 PM   #3
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
eschwartz,
Thanks for responding. The archive doesn't have to be in RAR format specifically. Any Win 8.1 supported archive formats will be considered provided they can automatically bulk archive subfolders & contents. I included the starting file path and resulting archive examples so readers could understand the input/output involved in case my wording was not clear.

Two questions:
1) Does your batch file retain the original documents? (I would rather manually delete them only after confirming they were correctly archived.)
2) Can the resulting archive be written to a different destination path?
Sabardeyn is offline   Reply With Quote
Old 01-18-2016, 04:10 PM   #4
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
Why don't you buy a (cheap) USB hard drive, and back up to that? Most, if not all of them come with backup software that will mirror your pc's hard drive.
susan_cassidy is offline   Reply With Quote
Old 01-18-2016, 04:10 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
I can't think of any archive utilities that automatically delete input files.
And specifying the output file can take any filename path.

...

Since my example was using the unix (linux/OSX) bash shell...
For a batch file, try something like:
Code:
cd C:\User\Docs\
for /d %%d in ("*") do (
    7z.exe a C:\path\to\archive\%%d.zip %%d\
)
I am not 100% positive that that is valid batch syntax (I am not a Windows user and I get confused sometimes ), but I *think* that will do it.
You can change the archive name and extension and 7-Zip should do the right thing automatically based on your chosen extension (*.zip, *.7z, *.tar.gz should all work).
%%d is the variable holding the name of the folder and also specifies the filename of the archive.

This uses the http://7-zip.org command-line 7z.exe so it must be in your PATH or else you must specify the full location of 7z.exe

Last edited by eschwartz; 01-21-2016 at 11:48 AM.
eschwartz is offline   Reply With Quote
Advert
Old 01-21-2016, 11:30 AM   #6
grumbles
Addict
grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.
 
grumbles's Avatar
 
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
Zip has the -m option that will move files into the archive. That is, it deletes the files after placing them in the archive. I don't have 7z installed so I don't know if it has that option as well. The zip archive format is supported everywhere.
grumbles is offline   Reply With Quote
Old 01-21-2016, 11:50 AM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by grumbles View Post
Zip has the -m option that will move files into the archive. That is, it deletes the files after placing them in the archive. I don't have 7z installed so I don't know if it has that option as well. The zip archive format is supported everywhere.
In other words, since Sabardeyn wants to NOT delete files after archiving them... stay away from non-default options on Info-Zip and he will be okay.
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bulk fill title with same value (like bulk rename author)? rebl Library Management 1 08-22-2014 12:05 PM
Automatic Convert and Automatic Add not working together kylliancole Calibre 3 08-03-2012 11:57 PM
automatic updates kabaczek124 Amazon Kindle 3 02-14-2011 03:47 AM
K2 skins recommendations/reviews? Wanted: add grip, no bulk, good fit/coverage Starhawk Amazon Kindle 12 03-24-2009 04:01 PM
Automatic shut off? Stacey34 Sony Reader 8 03-14-2009 06:11 AM


All times are GMT -4. The time now is 09:27 AM.


MobileRead.com is a privately owned, operated and funded community.