Jump to content
UBot Underground

Why do i get an error with get files?


Recommended Posts

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?

Link to post
Share on other sites

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?

Link to post
Share on other sites

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.

Link to post
Share on other sites

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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

Link to post
Share on other sites

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)

Link to post
Share on other sites

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

 

TC

example-addomroy-get files.ubot

Link to post
Share on other sites

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")
 

  • Like 1
Link to post
Share on other sites

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 :rolleyes:

  • Like 1
Link to post
Share on other sites

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 :rolleyes:

 

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?

Link to post
Share on other sites

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

file 2.txt
c:\desktop\file 1.txt

c:\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...

Link to post
Share on other sites

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.

Link to post
Share on other sites

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

Link to post
Share on other sites

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 Approved

TC

Link to post
Share on other sites

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.

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