473,372 Members | 909 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,372 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 1709
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.