how to list files with extension .txt in windows?

ed ed_tsang at yahoo.com
Fri Dec 3 02:08:48 EST 2004


hi I ahve a simple question and is new to python.
I have a folder in windows that contains some .txt files.
the fucntion that i want to do is whenever there is new directory
created (say 249, thos enew directorys are always in numbers in 3
digit), i want to grap that 249 and the previous created one (say
230), then call a .btm script TWICE which accepts these two numbers as
parameters. so the script I called will be under 4NT and synatax under
4NT are:
script 230 249
script 230 249 A

How can i do that in python.

Those two folders sits on network drive and I have mapped that to G:\
drive.
platform I am on is windows 2000 or XP pro.

I have used batch script to do it but it has a lot of issues with
access denied... errors I pretty much given up using batch to do this.

Thanks



More information about the Python-list mailing list