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

develop automated folder structure

I want to desing a automated folder structure script, when given the name of the root folder, the children folders along with the root folder are created automatically.

The folder structure should be like this:

ParentFolder
--> 1. Child1 ==> GrandChild1, GrandChild2, GrandChild3
--> 2. Child2
--> 3. Child3

Only the name of the ParentFolder will be given by the user and other folders name will be hard coded.

How can I do it?

Please can any one help me, do any one have any snippets for this?
Mar 18 '14 #1
1 1529
bvdet
2,851 Expert Mod 2GB
The os module provides all the functionality to do what you want. os.makedirs(file_path) will recursively create nested directories. os.path.join(path1 [,path2 [, ...]]) will intelligently joint one or more path components into a complete path name.
Mar 18 '14 #2

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

Similar topics

2
by: ragha | last post by:
Dear friends I am emulating thr tree structure mentioned in the article http://www.15seconds.com/issue/010921.htm I have succesfully created the folder structure for level 2 I need this...
0
by: David Waddell | last post by:
Hi, I'm trying to setup a project folder structure in vs.net 2003 as follows : <project root> src doc test bin The only glitch I'm hitting is that the "New Class" wizard will append ".src"...
0
by: riversmithco | last post by:
Hi all, I am pulling my hair out on this one. I am following the Microsoft guidelines on how to structure folders and check in ASP.Net apps to VSS. Here's the problem: 1. I create a blank...
9
by: Paul | last post by:
I'm trying to make get my app to delete all the files in a specified folder and all the files within the folders of the specified folder. e.g. Folder 1 contains three files (File1, File2, File3)...
0
by: andoband | last post by:
Using VS 2005, I have created a solution and it's projects using the following physical folder structure: d:\projects\Enterprise.root\Enterprise\Enterprise.sln...
4
by: Sergei Minayev | last post by:
Hi All! Can you please help me with the following problem: I need to store a copy of local folders structure in MySQL database. I have chosen the following table structure for that:...
1
by: rkoduru | last post by:
Hi All, I am looking for a script which will parse the folder structure (recursive) of a drive using my windows credentials (2003 domain) and give me the list of any folders/files that i dont have...
0
by: HarXon | last post by:
Hi, I am relatively new to C# and am attempting to implement the following: I currently have a text file containing the full path of all folders on a disk, from this i would like to create a...
5
by: IUnknown | last post by:
Ok, we are all aware of the situation where modifying the folder structure (adding files, folders, deleting files, etc) will result in ASP.NET triggering a recompilation/restart of the application....
0
by: Chuck Anderson | last post by:
I'm trying to come with a good organization plan for the Apache, Php, MySQL development software on my home PC and am wondering what sort of folder structure others may have come up with that seems...
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
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...

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.