Jump to content
UBot Underground

Get the folder where .ubot or the bot is located


Recommended Posts

Hi,

 

For those who are familiar with Zenno, I am looking for the equivalent of {-Project.Directory-} variable, that is the folder where the project file / the compiled bot is located.

Sorry if I am asking something basic, but I could find answer for this question. Perhaps there should be a different approach to get to being able to access files and folders which are put next to the script / bot.

I could not see this among the Special folders option either.

 

Thanks in advance!

Link to post
Share on other sites

you have the option to use 

 

ui open file

 

and 

 

$read file

 

The file location is set as a variable that you can then use to point to. It can be anywhere on the pc

Link to post
Share on other sites

I think you are looking for function called "$special folder" where you choose ("Application") from dropdown to get folder of the application that is being ran.

  • Like 1
Link to post
Share on other sites
  • 3 months later...

@the_way: thank you for the tip, but I would like to provide my users just a simple instruction like put this .exe file next to the files you want to work with. Asking them to open the .exe file and once opened, specify the file location again, would be just silly.

 

@UBotDev: The Application folder picked from the Special folder would be just fine, but as you can see in the below table, it is not pointing to the folder where my ubot file or bot file is located. Should the Application folder point to the script's/bot's containing folder, or is it OK to get a value like: C:\Windows\system32? (As you can see I am using Ubot via VMWare & Parallels on OS X) Thanks!

 

Application C:\Windows\system32 Application Data C:\Users\jpeter\AppData\Roaming Desktop \\vmware-host\Shared Folders\Desktop Favorites C:\Users\jpeter\Favorites My Documents \\vmware-host\Shared Folders\Documents My Music C:\Users\jpeter\Music My Pictures C:\Users\jpeter\Pictures My Videos C:\Users\jpeter\Videos Program Files C:\Program Files (x86) Startup C:\Users\jpeter\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup System C:\Windows\system32
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...