[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

os.rename() problems on OS X

lukas

1/11/2008 8:29:00 PM

hello,

i recently had the job of having to rename about 200 files. The source
for the renaming was a bunch of names in a file. I know next to
nothing when it comes to bash scripting (which would have seemed the
obvious choice) so i used python. The files i was renaming were canon
raw files (.CR2). my problem is that after i rename the files, OS X
will no longer render the thumbnails for the files, and preview is no
longer the default app for viewing them. Does anyone have an idea as
to why this is? Thanks for the help :)

-Lukas
1 Answer

Steven D'Aprano

1/12/2008 2:48:00 AM

0

On Fri, 11 Jan 2008 12:29:24 -0800, lukas wrote:

> hello,
>
> i recently had the job of having to rename about 200 files. The source
> for the renaming was a bunch of names in a file. I know next to nothing
> when it comes to bash scripting (which would have seemed the obvious
> choice) so i used python. The files i was renaming were canon raw files
> (.CR2). my problem is that after i rename the files, OS X will no longer
> render the thumbnails for the files, and preview is no longer the
> default app for viewing them. Does anyone have an idea as to why this
> is? Thanks for the help :)

Did you rename them to "file001.TXT" etc.?

Sarcasm aside, you don't give us enough information to answer the
question, but I can make some vague suggestions:

What did you rename them to?

Do the files still have a .CR2 extension?

What is the default app for viewing them now?

Have you tried forcing OS X to reload the directory? (I assume there is a
"Refresh" command somewhere in the user interface.)

If you Get Info about the file, what does it tell you?

Does OS X have a concept of file type and file creator meta-data, like
the old classic Mac operating system did? If so, have you changed them?



--
Steven