473,385 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to list files with extension .txt in windows?

ed
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
Jul 18 '05 #1
3 1604
ed wrote:
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.

If you do not have permission to access the files, switching to a
different language will not help you. You need to determine the cause
of your access errors first.

Aaron

Jul 18 '05 #2
ed wrote:
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.

If you do not have permission to access the files, switching to a
different language will not help you. You need to determine the cause
of your access errors first.

Aaron

Jul 18 '05 #3
ed
I do have permission toa ccess the file as that file is careted and read my me.
I have read/write access to that location. regards
Aaron Bingham <bi*****@cenix-bioscience.com> wrote in message news:<ma**************************************@pyt hon.org>...
ed wrote:
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.

If you do not have permission to access the files, switching to a
different language will not help you. You need to determine the cause
of your access errors first.

Aaron

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brad Tilley | last post by:
I was using Python to tar up some files each day in a directory by calling os.popen("/bin/tar.......). Everything was working well until the app that generated the files was set to generate a file...
5
by: bart plessers | last post by:
Hello, I am developping a file browser bu use of internet explorer. I am already so far that I get a full list of all the files of a selected directory. However, I only want to display...
4
by: Peter A. Schott | last post by:
Trying to operate on a list of files similar to this: test.1 test.2 test.3 test.4 test.10 test.15 test.20
20
by: max | last post by:
Hi! I'm having a problem with a very simple drop-down list since the page comes out with no elements in the drop-down but giving no errors. This is the code: <form name="year_search_form"...
1
by: Aaron via DotNetMonster.com | last post by:
I am testing for several file types in a directory by creating an array of masks and for each mask in the array, I execute a GetFiles. My issue is that the VB code: ...
1
by: John | last post by:
Hi I would like to allow users to add images to a list on form by browsing and selecting images from the disk. What would be a good mechanism to do this? Thanks Regards
6
by: (PeteCresswell) | last post by:
User wants to go this route instead of storing pointers in the DB and the documents outside. Only time I tried it was with only MS Word docs - and that was a loooong time ago - and it seemed to...
6
by: kimiraikkonen | last post by:
Hello, I have a listbox and folder browser control. I need to display all .mp3 files' pathes into listbox. It was Ok with openfiledialog but how can list all .mp3 extension- having files into...
6
by: tgnelson85 | last post by:
Hello, C question here (running on Linux, though there should be no platform specific code). After reading through a few examples, and following one in a book, for linked lists i thought i would...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.