theninjamanz 29 Posted September 9, 2010 Report Share Posted September 9, 2010 Here is what I wanted to do.... At the end of each project run I wanted all the files to be saved in a folder inside the application folder. However, if the name of that folder was more than 1 word, using the shell command it would create two folders. IE if I was using a keyword such as "Nice Houses" as the folder name, I would get "nice" and "houses" as the folders created. And then saving to these folders was impossible. So an hour of headbanging later I have come up with the following sub, which you can copy and run yourselves. Here is what it will do, and note that this will work on when you have compiled the bot and created a folder system in the application folder. you also must have a text file called filecounter.txt in that folder with just the number 1 on the first line! What it does: 1. reads the first line in the file.2. sets numberinlist to the number at position 0 (IE the first line)3. then increment the number in list by 14. then save that number to the file.5. then run shell and use that number to create a folder. Each time it runs it will read the number in the text file and make a folder that is the last folder number plus 1. I'd love to be able to get these shells nested so that all the folders were created nicely, SUCH as MD/projects/#numberinlist but I don't know about that... So this sub will create the folders in the root of the application folder. Have a nice day! Ninjaman. 2 Quote Link to post Share on other sites
JohnB 255 Posted September 15, 2010 Report Share Posted September 15, 2010 Very Nice Ninja! Thank you for the great share. John Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.