Jump to content
UBot Underground

Determine files in a folder and add to list


Recommended Posts

Anyone knows how to determine filenames and it's extensions in a folder and add these to a list?

 

Also how to determine whether there are subfolders in a folder and add these subfolders to a list?

Link to post
Share on other sites

You will have to execute a Shell command and then issue a statement like this in a batch file:

 

dir /AD /B > directory-list.txt

 

Then you can load that file into a list in your bot.

 

Thanks buddy.

Yep i already found that here too yet http://ubotstudio.com/forum/index.php?/topic/3478-choose-random-file-to-upload-from-folder/

 

I'll play with it now.

Thanks again. :)

Link to post
Share on other sites

The pro and dev version now has a get files constant for putting the file names into a list. Don't believe its recursive as far as folders go though.

 

Andy

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