addamroy 36 Posted August 23, 2014 Report Share Posted August 23, 2014 For some reason I'm getting a script error "could not find part of the path"... I'm using , add to list, and in the 'list to add', I'm using $get files, which is just a simple path to > (special folder, application)\images I just need a list of the files, but it won't let me. Is it because $get files is not compatible inside an 'add to list' command? Quote Link to post Share on other sites
addamroy 36 Posted August 23, 2014 Author Report Share Posted August 23, 2014 I even tried, $add list to list > list from text > get files, rather than just, add to list > get files, still getting the same script error. Very annoying, and ubot keeps locking up everytime it tries to run it. EDIT - Nor can I do set > get files. Looks like ubot bug? Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 23, 2014 Report Share Posted August 23, 2014 Try this add list to list(%a, $list from text($get files($special folder("Desktop"), "Yes"), $new line), "Delete", "Global") http://wiki.ubotstudio.com/wiki/Main_Page TC Quote Link to post Share on other sites
addamroy 36 Posted August 23, 2014 Author Report Share Posted August 23, 2014 It will not let me get files any deeper than the special folder, I can't get files from from any sub directories at all. IE - get files > specialfolderDesktop > folder does not work for some reason. Quote Link to post Share on other sites
addamroy 36 Posted August 23, 2014 Author Report Share Posted August 23, 2014 set(#testgetfiles, $get files("{$special folder("Application")}\\folder", "No"), "Global") does not work, whyy Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 23, 2014 Report Share Posted August 23, 2014 add list to list(%a, $list from text("{$get files($special folder("Desktop"), "Yes")}\\folder a\\folder b", $new line), "Delete", "Global") The drop down 'Include Path' needs to be Yes yours is No Quote Link to post Share on other sites
addamroy 36 Posted August 23, 2014 Author Report Share Posted August 23, 2014 lol, I swear I tried that like 10 times. 11th time worked ??? Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 23, 2014 Report Share Posted August 23, 2014 yeah, ubot gets confused when you mess with a node {sooo|tooo} many times best to make fresh node and test if not then restart UBS Quote Link to post Share on other sites
addamroy 36 Posted August 23, 2014 Author Report Share Posted August 23, 2014 That doesn't work. I thought it did because I didn't get the error. Those trailing slashes, I don't believe should be outside the $get files command. And when you put them inside, it doesn't work. Quote Link to post Share on other sites
addamroy 36 Posted August 23, 2014 Author Report Share Posted August 23, 2014 If you try to get to any folders within the 'specialfolder' with a get files command it doesssss nottttt workkkk. Your code above was pulling some really strange results.. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 23, 2014 Report Share Posted August 23, 2014 IDK man, you in different country? I'm in US file paths could be diffeent try setting in set first then add to list all I know it works for me TC Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 23, 2014 Report Share Posted August 23, 2014 set(#FP, "{$get files($special folder("Desktop"), "Yes")}\\folder a\\folder b", "Global")clear list(%a)add list to list(%a, $list from text("{$get files($special folder("Desktop"), "Yes")}\\folder a\\folder b", $new line), "Delete", "Global")alert(%a) Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 23, 2014 Report Share Posted August 23, 2014 restart everything including your computer then open this file attached if that doesn't work put in support ticket I am using UBS v4 NOT UBS v5 TCexample-addomroy-get files.ubot Quote Link to post Share on other sites
addamroy 36 Posted August 23, 2014 Author Report Share Posted August 23, 2014 It doesn't work. This should work. Test it in yours, if it works for you I'm going to be upset lol... I restarted everything. set(#testgetfiles, $get files("{$special folder("Application")}\\images", "No"), "Global") 1 Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 23, 2014 Report Share Posted August 23, 2014 set(#testgetfiles, $get files("{$special folder("Application")}\\images", "No"), "Global") I said before you need to change that NO to a YES!! http://www.ubotstudio.com/forum/index.php?/topic/16789-why-do-i-get-an-error-with-get-files/&do=findComment&comment=100666 set(#testgetfiles, $get files("{$special folder("Application")}\\images", "Yes"), "Global") in the get files node there is a drop down under the file path...the second input field include path Yes/No that means to include the file path special folder("Application")}\\images TC PS make sure you have some files in there too 1 Quote Link to post Share on other sites
addamroy 36 Posted August 23, 2014 Author Report Share Posted August 23, 2014 set(#testgetfiles, $get files("{$special folder("Application")}\\images", "No"), "Global") I said before you need to change that NO to a YES!! http://www.ubotstudio.com/forum/index.php?/topic/16789-why-do-i-get-an-error-with-get-files/&do=findComment&comment=100666 set(#testgetfiles, $get files("{$special folder("Application")}\\images", "Yes"), "Global") in the get files node there is a drop down under the file path...the second input field include path Yes/No that means to include the file path special folder("Application")}\\images TC PS make sure you have some files in there too Setting that to "YES" does not include the extra file path, it includes the full file-path of the files in the folder. IE full path YES displays getfiles results as, C:\\path\to\files\image.jpg full path NO displays getfiles results as, image.jpg So again, that does not work. And regardless, if I have it set to YES or NO, it does not work. Did you try that code yourself or just put it into Ubot and assumed that it works? Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 24, 2014 Report Share Posted August 24, 2014 haha...dude, that function only does 2 things how can you not manage to get it to work? http://wiki.ubotstudio.com/wiki/Get_Files it returns file(s) in one specific folder with or with out a file path create folder($special folder("Desktop"), "GF test")save to file("{$special folder("Desktop")}\\GF test\\fake file 1.txt", "abc")save to file("{$special folder("Desktop")}\\GF test\\fake file 2.txt", "abc")set(#with FP, "{$get files($special folder("Desktop"), "Yes")}\\GF test", "Global")set(#NO FP, "{$get files($special folder("Desktop"), "No")}\\GF test", "Global")clear list(%with file path)add list to list(%with file path, $list from text($get files("{$special folder("Desktop")}\\GF test", "Yes"), $new line), "Delete", "Global")add list to list(%with file path, $list from text($get files("{$special folder("Desktop")}\\GF test", "No"), $new line), "Delete", "Global")alert(%with file path) Please show us example of what you want to see ie file 1.txtfile 2.txtc:\desktop\file 1.txtc:\desktop\file 2.txt not rocket science this function your "example-bot.ubot" file needs to be in a folder too, same as your compiled .exe it would need it's folder too and that would be the application folder can you get the example above to work? I made to work on desktop... Quote Link to post Share on other sites
addamroy 36 Posted August 24, 2014 Author Report Share Posted August 24, 2014 set(#testgetfiles, $get files("{$special folder("Application")}\\images", "No"), "Global") Paste that into a bot. Put an 'images' folder inside your application folder. Put some files in this folder. Just to test. Then run this node. Tell me if it gives you an error. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 24, 2014 Report Share Posted August 24, 2014 yep I tested it no error I think you have version 5 maybe? I asked earlier...no answer look at uploaded file- screen shot proofsgftest.ubot Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 24, 2014 Report Share Posted August 24, 2014 yep in my response in post 13 http://www.ubotstudio.com/forum/index.php?/topic/16789-why-do-i-get-an-error-with-get-files/&do=findComment&comment=100677 I asked your version 4 or 5 well I tested in 5 and does not work!! you can get v4 download link from support ticket system I had link but cant find it TC Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 24, 2014 Report Share Posted August 24, 2014 sent link in PM Quote Link to post Share on other sites
addamroy 36 Posted August 25, 2014 Author Report Share Posted August 25, 2014 I'm using ubot 4 right now I have no idea why it would work for you and not for me. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 25, 2014 Report Share Posted August 25, 2014 here is another option you need Advanced Shell Plugin by ubotdev.com it's free set(#get files, $C get files("{$special folder("Desktop")}\\GF test"), "Global")set(#options list, $plugin function("Advanced Shell.dll", "$shell batch hidden", "dir /?"), "Global")define $C get files(#File Path) { return($plugin function("Advanced Shell.dll", "$shell batch hidden", "cd \"{#File Path}\"dir /a:a /b /n"))} maybe will work 4 u Tested and ApprovedTC Quote Link to post Share on other sites
addamroy 36 Posted August 25, 2014 Author Report Share Posted August 25, 2014 I AM SUCH AN IDIOT! This whole time I've been testing this 'getfiles' command... I've been expecting it to read files from the application folder where all the images are for the compiled bot.... My UBOT project file is NOT in the same folder as the COMPILED bot lmaooooooo. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 26, 2014 Report Share Posted August 26, 2014 Speechless and it only took a few days but glad you got it sorted 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.