Hi Guys, Calling all hard core geeks. Here is a good one for you... I need to create a few hundred folders on a networked drive. Each folder named after a provider on my database. Barnados, NSPCC, Action for Children etc ( I can export the names to notepad or whatever form needed). Is it possible to do this without installing an app? (work PC restrictions) On XP by the way. If not what app/batch do I need? I would prefer to create the folders with 3 sub folders in each too. One called contracts one called monitoring and one called documents. This isnt essential though. Help greatly appreciated or else its gonna be a long week next week! Much love, Dean.
Bit of vbscripting should do the job nicely. To save time programming it you could just export the names to a text file, cast them into an array, and then loop the folder create method. http://www.activexperts.com/activmo...ts/filesfolders/folders/#CreateNewFolders.htm That's some sample code that'll do it, from a "its possible" aspect. By doubling up the code you can create your subfolders (ie, inside the loop, copy this code sample, add a "1" to the end of objFolder and make your first subfolder, 2 for your second, 3 for your third, etc. I don't know enough about windows shell scripting to give you the full thing though.
Pretty simple, export the names to a .txt file on separate lines of the text file. In this example the names are stored in a .txt file called file.txt Make a batch file called anything mines batch.bat, real inventive. It basically goes through each line of the text file and makes the line into a variable, it creates the folder using the variable value and then forgets the variable and goes to the next line and repeats, it skips any empty lines and finishes at the bottom of the text file. Create thousands of folders in seconds! You can follow this idea to create the subfolders your looking at making also, if you cant do this I might be able to help, might be good to learn so see if you can work it out yourself I would test this on a local machine to make sure it works, and you know how its creating them before you go playing with a live server
Dude....... You my friend are a total and complete ledgend! It works beatifully and doesnt trigger and work security. I will now try and work out how to create standard sub folders in each on creation but will likely struggle. EPIC FAIL! If anyone want to point me in the right direction -much kudos. Buit to be fair its allready saved me at least a days work. Our penny poinching government thanks you for these efficiency savings! Who knows maybe Dave will let me keep my job! Hmmm sub folders..... Thanks, Dean.