myubo 2 Posted February 7, 2019 Report Share Posted February 7, 2019 Hi I need to add a line to my bot which deletes a file from AppData/Roaming/.../file.txt Since every person has a different path to AppData folder how do you go about this? How do you find out what the current users username is e.g: C:\\Users\\ THIS COULD BE ANYTHING \\AppData\\...? I tried without success: delete file("{$special folder("AppData")}\\Roaming\\... Quote Link to post Share on other sites
HelloInsomnia 1103 Posted February 7, 2019 Report Share Posted February 7, 2019 Special Folder appdata includes the Roaming part of the path, so maybe remove that. You can see the path it gives you here: alert($special folder("Application Data")) And it will change if your username is changed, for example, mine is this: C:\Users\Nick\AppData\Roaming I'm sure yours is different unless you have the same username 1 Quote Link to post Share on other sites
myubo 2 Posted February 7, 2019 Author Report Share Posted February 7, 2019 Awesome thanks bud, changing AppData to Application Data, and removing Roaming worked . Final code: delete file("{$special folder("Application Data")}\\UBot Studio\\cef_browser_log.txt") 1 Quote Link to post Share on other sites
myubo 2 Posted February 8, 2019 Author Report Share Posted February 8, 2019 Actually if anyone else has issues with file ref_browser_log.txt becoming HUGE, mine got to 12gb once. Just go to the file and under preferences change it to read-only. This is good for personal use, not great if you are selling bots however. 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.