How do I use 'MoveFile'?

The new version file storage methods look useful but I don't inderstand how to use them. Why is the 'MoveFile' operation Boolean? How do I implement this in my project?
I have transferred a MIDI file from my Teensy over Bluetooth and saved it in the ASD (Thanks Juan). I can also share this file using the Share block with the 'MakeFullPath' block. But now I would like to transfer the file from the ASD (APP scope) to the shared storage media/music directory (Shared scope?) in the hope that it will be easier to find and access. When I try a simple move using the MoveFile block in an If/Then block the app abruptly stops and returns to the operating system without, of course, not moving the file

.
Any hint would be useful.
Many thanks.
Nigel

Show your file_name2. At the moment, it should not contain any spaces.

Hi Patryk
Thanks for the quick reply. Here is screen shot of how the name is generated. The input at the moment is normally just one letter for testing the system. The whole thing works fine - receive the base64 encoded file, decode and store in ASD using the file_name2, sharing the file over email to my Google account - but the MoveFile fails.
I am pretty sure that using just one letter will introduce no spaces into the name. Should I use a modified name for the 'toFileName?

There are still some (serious) problems and bugs with the File component. It therefore makes little sense to make any further suggestions. Copy / move to Shared does not work with any Android version. In the meantime (until the bugs are fixed), you can use the TaifunFile extension. But that requires a lot of experimentation and experience with the storage (permisson) system, and you have to test it on all Android versions (not only on Android 10 and 11).

See e.g. here:

Thanks Anke.
It seems that I need to wait until the bugs are ironed out. I'll just leave the file in ASD and rely on the Share block to get it out easily at the moment. The TaifunFile extension looks to be a powerful tool but I do not have the experience or perhaps the patience to try it out in all circumstances.
Thanks again.

directories and file names are case sensitive...

what about showing us your Do it result?

Unbenannt

see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Morning Taifun
Thanks for your message. As a result of Anke's note I have decided not to persue this issue until the bugs in the File component are ironed out. My program is highly dependent on Bluetooth file transfer and I am not sure how to integrate this with the 'DoIt' function. If I have some time I will try to write a smaller independent program to try to understand what is going on but at the moment I am deeply occupied with the mechanical aspects of the project that are taking almost all of my time. (I am not trying to be negative but my time is limited and the other aspects of the project are important. The MoveFile aspect was only a very small bell in all the bells and whistles that I have to manage.)
Thanks again for your tip.
Nigel

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.