Author Options:

How to get the properties from a file with python Answered

I need to know how to see if files(like .txt files) are empty with python and how to create new files(like the ones you store pics and .txt files in) and how to move files(like .txt) into the files you just created

Thanks in advance for any answers!


I recommended Dive Into Python in the previous question. It's not the only place to read, but it's a start. How far did you get in reading through it? What other Python tutorials have you started on, and do you have any code that attempts to check file size, create new files, etc.?

And when you say you want to move files into the files you just created, do you really want to rename one file to another name, or to copy its contents into a new file?

Ok. I know python very well but I dont know how to: 1. create a file(like one you store pictures in) 2. move a file(.txt) That is all p.s. sorry I thought the link was to python.org

You mean how to create a folder or directory to store things in? That's entirely different from creating a file.

If so, and if you have as much Python experience as you indicate, then did Googling "create directory python" and "list directory python" not return anything relevant?

thank you for showing me that, it was verry useful!