working with files and directories

H

halex2000

Hi all, I'm new with Python, and I thought to use it to automatically rename
some files in a directory, but I don't know where should I search the
functions: to get all the files of a directory, to rename the files and so
on.
Thank you.
 
B

Bryan Olson

halex2000 said:
Hi all, I'm new with Python, and I thought to use it to automatically rename
some files in a directory, but I don't know where should I search the
functions: to get all the files of a directory, to rename the files and so
on.

Python programmers are constantly looking at:

http://docs.python.org/lib/lib.html

In this case, see 14.1.4, 11.1, and 11.10.

Happy hacking.
 
T

Thomas Ploch

halex2000 said:
Hi all, I'm new with Python, and I thought to use it to automatically rename
some files in a directory, but I don't know where should I search the
functions: to get all the files of a directory, to rename the files and so
on.
Thank you.
Have you actually even tried to find some "documentation"?
Have you placed a google search "python directories rename files"?
Thomas
 
H

halex2000

Thomas Ploch said:
Have you actually even tried to find some "documentation"?
Have you placed a google search "python directories rename files"?
Thomas

Actually I did it on the documentation file provided with the windows
distribution. I took a look at 11 ("File and Directory Access") but the
listed functions doesn't appear to be what I need. 14.1.4 should do the job,
but was not as intuitive to find as the previous one.
 
D

Duncan Booth

halex2000 said:
Actually I did it on the documentation file provided with the windows
distribution. I took a look at 11 ("File and Directory Access") but
the listed functions doesn't appear to be what I need. 14.1.4 should
do the job, but was not as intuitive to find as the previous one.
Do you know about the search tab in windows help? Searching for "rename
files", or indeed a search identical to the one suggested for Google will
both find 14.1.4 as the top hit.
 
H

halex2000

Duncan Booth said:
Do you know about the search tab in windows help? Searching for "rename
files", or indeed a search identical to the one suggested for Google will
both find 14.1.4 as the top hit.

I'm aware of it, thank you. I usually don't use to ask for infos that I
could easily find myself in a few seconds, but I had not the time at the
moment to even start a search (of course, If I knew it would have been so
quick, I would have done it myself). I was just under the impression that I
was looking in the wrong place.
 

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

Members online

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top