Jump to content
UBot Underground

Organizing stuff in your apps


Recommended Posts

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 1

4. 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.

post-157-12840414473676_thumb.png

  • Like 2
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...