Shiny New E-Book Gizmo: The Amazon Kindle


View Full Version : rtf2lrf shows IOError: [Errno 2] if special characters in filename


xixix
03-03-2008, 04:50 PM
Dear All,
tried to search forums but no trace of this error or similar

C:\My Documents\My eBooks>cvt.bat
Processing Agatha Christie - C'Era Una Volta....rtf
Processing Agatha Christie - C'E Un Cadavere In Biblioteca.rtf
Traceback (most recent call last):
File "convert_from.py", line 207, in <module>
File "convert_from.py", line 120, in main
File "convert_from.py", line 82, in process_file
IOError: [Errno 2] No such file or directory: "C:\\My Documents\\My eBooks\\Agatha Christie - C'E Un Cadavere In Biblioteca.rtf"

C:\My Documents\My eBooks>


CVT.BAT file is:

@echo off
FOR /F "tokens=*" %%a IN ('dir /b "*.rtf"') DO (
echo Processing %%a
echo %%a | sed -e "s/\(.*\) - \(.*\)\.[rR][tT][fF]/\"C:\\Program Files\\libprs500\\rtf2lrf\" -a \"\1\" -t \"\2\" --category=Brivido --encoding=utf-8 --base-font-size=8 \"%%a\">NUL/" > tmp_.bat
call tmp_.bat
pause
del tmp_.bat >NUL
)


Offending Filename from explorer is:
Agatha Christie - C'È Un Cadavere In Biblioteca.rtf

Anyone has tips on this?

Thanks,
Xixix.

Penforhire
03-04-2008, 12:45 PM
Change the file name?

JSWolf
03-04-2008, 02:10 PM
Change the file name?

:rofl:

xixix
03-05-2008, 05:17 PM
:rofl:

OK, you Penforhire start changing filenames of the first 500 ebooks and you JSwolf go on with next 501-1000

Still :rofl: ?!
:speechles

JSWolf
03-05-2008, 05:23 PM
But do you really need to bulk convert 1000 eBooks at one time? Can you actually read them fast enough that you need them all NOW?

xixix
03-05-2008, 05:35 PM
:rofl:

But do you really need to bulk convert 1000 eBooks at one time? Can you actually read them fast enough that you need them all NOW?

Dude ... you here for:

[ ] Laughing?
[ ] Arguing?
[ ] Questioning about reasons for bulk converting?
[ ] Supporting?

Place "X" mark where needed; no multiple choices allowed!
Only one answer is the right one ... others are OT ... you choose!

kovidgoyal
03-05-2008, 05:39 PM
This works for me. Probably a result of having a non-standard windows file-system encoding, though I realy don't know enough about windows to say more.

JSWolf
03-05-2008, 10:49 PM
Dude ... you here for:

[X] Laughing?
[ ] Arguing?
[X] Questioning about reasons for bulk converting?
[X] Supporting?

Place "X" mark where needed; no multiple choices allowed!
Only one answer is the right one ... others are OT ... you choose!

curtw
03-06-2008, 07:52 AM
<snip>

Anyone has tips on this?

Thanks,
Xixix.

My recommendation is that you not even bother trying to convert these files. RTF displays as well as (sometimes better than) LRF on the Reader. Why create a problem when none existed before?

xixix
03-07-2008, 12:44 AM
My recommendation is that you not even bother trying to convert these files. RTF displays as well as (sometimes better than) LRF on the Reader. Why create a problem when none existed before?

Reason to convert is that size ratio RTF/LRF = 3/1 on average.

Thank you all for perspectives and support.

Xixix.