473,395 Members | 1,556 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,395 software developers and data experts.

retrieeving directory folders and sub folders

I Need Code For Retrieving Folders And Sub Folders Usng Python. May Be According To A Specific Condition May Be Say Folder With Names Www Etc..
Please Help
Aug 3 '07 #1
3 1712
ghostdog74
511 Expert 256MB
I Need Code For Retrieving Folders And Sub Folders Usng Python. May Be According To A Specific Condition May Be Say Folder With Names Www Etc..
Please Help
Use the os.walk() method. See here
Aug 3 '07 #2
It is helpful to wrap os.walk to create a custom generator. My version of this was published in the Python Cookbook, a must-have text for anyone working in the language. A simpler version is on my programming blog if you want a quick demonstration.
Aug 9 '07 #3
bartonc
6,596 Expert 4TB
It is helpful to wrap os.walk to create a custom generator. My version of this was published in the Python Cookbook, a must-have text for anyone working in the language. A simpler version is on my programming blog if you want a quick demonstration.
Thanks, Robin. I checked out you site: It's quite nice and the link doesn't seem to violate any Posting Guidelines. I hope you stick around and grab a few questions along the way.

Thanks for joining,
Barton
Aug 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jeff Reed | last post by:
I am experiencing the the problem outlined the below. Unfortunately, I am using WinXP and I not sure if I can apply the solution due to lack of security control Any feed back would be apreciated ...
0
by: Support | last post by:
I've a problem while creating web setup project using "Setup & Deployment Projects" (for Web projects/Web setup). The following steps I followed while doing so. 1. Created a web setup project...
2
by: Manny Chohan | last post by:
Hi Guys, I am currently programming in Vb .net. I am stuck at point. i have a root directory C:\test which has couple of sub-folders c:\test\test1 ; c:\test\test2 ; c:\test\test1\test4 and so...
6
by: Martin Bischoff | last post by:
Hi, I'm creating temporary directories in my web app (e.g. ~/data/temp/temp123) to allow users to upload files. When I later delete these directories (from the code behind), the application...
22
by: rtilley | last post by:
# Spaces are present before and after the XXX filename = ' XXX ' new_filename = filename.strip() if new_filename != filename: print filename Macs allow these spaces in file and folder...
7
by: Brian Cahill | last post by:
Hi, I am attempting to delete Profile folders from C:\Documents and Settings\. I am receiving a Permission denied error when using the Directory.Delete method. Here is my code. Is there any...
3
by: Kimera.Kimera | last post by:
I'm trying to write a program in VB.net 2003 that basically deletes all files, folders, sub-folders and sub-sub folders (etc). The program is simply for deleting the Windows/Temp folder contents,...
2
by: halimunan | last post by:
hello all, how do i delete all folders and files inside a directory while at the same time keeping(not deleting the directory) ? e.g : i want to delete all folders and files inside c:\temp it...
2
by: runway27 | last post by:
i am using apache server and presently when i try accessing any folders of my website i am able to browse the files ex = www.website.com/images which is a serious security risk as i am building a...
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:
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
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.