Why I can't move file using Kodular blocks?

Hi, guys, it is simple but I am trying for more than 1 hour and still was not capable to make it work.
Please see the screenshot and show me what I am doing wrong.
image

I know I can use extension for this but if it is possible I want to avoid to use an extension to do something so simple.

1 Like

use Do it to debug your blocks or display the relevant variables in a label, especially interesting would be to know, what is the content of filePath
see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
Taifun

2 Likes

I will try to learn about this “Do it”, Taifun. Thanks.

And about the filepath, I tested it before, but I removed this part for the screenshot:man_facepalming:
It was like this:
/storage/emulated/0/Download/lisa.txt

Edit: This “Do it” is really interesting. I didn’t know it, I guess I will read that book in app inventor website. Teorically I know all the tools but sometimes I find out about new things like this lol.

But anyway, it didn’t solve the problem. The file is not being moved.

1 Like

are you sure? my guess is, the filePath is only the filePath without fileName
you might want to display the filePath in a label and show us the Do it result of the label

Taifun

3 Likes

Yes I am sure. The Do it result in zero and the path is like I typed.
See the screenshot (I am using a button but I don’t think it make any difference right?):
image

I tried this way too and the result was the same:
image

1 Like

Does the folder exist that you are trying to move to

bild
/Boban

1 Like

Yes the folder exists. At screen initialize block it is checked if the folder exists or not. If not it is created.

I believe it is something related to the format of the path because the block read from was giving problem too.

I was about to send .aia here but my city had a bblackout / is without electricity (sorry if this is not the correct word) so I can’t use my computer for now.

Add an slash to your path

bild

/Boban

2 Likes

Add an slash to your path

hahaha it worked now.

Thank you both Boban and Taifun!

I think the problem is that as Taifun said Companion doesn’t understand if I use the full path ( > /storage/emulated/0/folder/file.extension), right?

1 Like