10-14-2008, 12:38 PM | #1 |
Groupie
Posts: 193
Karma: 1107
Join Date: Oct 2007
Device: Infinite Kindles, Occasional Sony's
|
Script to convert a directory full of files?
In the 'some people are never satisfied' category...and trying real hard not to violate forum rules...
Let's assume that I have a folder full of EBooks on my Windows desktop. They are in a format that will not work on my soon-to-arrive Sony reader. Also assume that I have a Python script (call it 'MobiDeXXX') that will magically change them into something that I can load into Calibre and then do a batch-convert to the format Sony loves. Is there a script (or could some genius write one) that would take this entire directory and run the magic Python script against each file, one at a time, and save the results into a different directory? Note that I am being purely lazy here, since I can of course type in the 200 file names, one at a time, into the command window and run the Python script against them. But if anyone can help with this, I would be most grateful! |
10-14-2008, 01:37 PM | #2 | |
Grand Sorcerer
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
|
Quote:
for %%i in (*.prc) do MobiDeXXX.py %%i %%~ni_free.prc PID Hypothetically of course. You could even get a bit more fancy and add an IF NOT EXISTS to it to only run the command if the _free file doesn't exist. I think adding an /R after the for and it will recurse directories also. BOb |
|
Advert | |
|
10-14-2008, 02:21 PM | #3 |
Groupie
Posts: 193
Karma: 1107
Join Date: Oct 2007
Device: Infinite Kindles, Occasional Sony's
|
Worked great, thanks so much!!!
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Txt files - Convert to Epub - Multiple files into one book - noob help | Cernan | Calibre | 6 | 05-18-2010 11:12 AM |
Should Calibre take a long time to add a directory full of ebooks? | jusmee | Calibre | 4 | 10-25-2009 11:34 PM |
Perl Script to convert to .lrf for Sony PRS | chas | Sony Reader Dev Corner | 7 | 11-22-2007 06:22 PM |
Handy Perl Script to convert HTML0 files to smartquotes | maggotb0y | Sony Reader | 0 | 04-12-2007 12:49 PM |
gDrive 0.6 - PHP script to store files on Gmail | TadW | Lounge | 0 | 02-24-2005 06:08 PM |