FileTools : Some tools to work with files

@koolcreativeapp

  • Which Android version?
  • Which folder?
  • What types of files are there?
  • The path file:///Documents/data.txt does not exist. Use either a relative path or an absolute path or a (correct) full path.
  • Show you blocks.
3 Likes

This path is wrong. If a path starts from file:// then you must specify the absolute file path but what you mentioned is neither absolute nor abstract/relative.

None of the above mentioned operations exists in FileTools extension.
Probably they are related to File component.

For more questions see the above post. :slightly_smiling_face:

Thanks both for reply.

I use Android 11.
Target Folder for text file is meant to ‘/Documents’ directory or its sub-directory e.g. /Documents/xyz.
I use combination extensions from Filetools and eFile, see blocks.

On the wrong path, what is the correct file path to set to absolute file because it works initially before uninstall & reinstall?

I attach the blocks and apk for mutual convenience.

Best rgds
KC
File.apk (5.4 MB)

this is because after uninstall the app is not owner of the files anymore… and after reinstall it is like the files have been created by another app…
it might be, that after reinstall you still can access the files using the SAF extension

Taifun

2 Likes

Thank you Taifun

I use lots of your extensions.
Will check out the SAF option.

Best rgds, KC

As @Taifun said, if a non-media file was created in one of the shared folders, this file can no longer be accessed after uninstalling and reinstalling the app, because the app “has no reminder” that this file was created by the app. In this respect, I have been solving the problem since targetSdk = 30 by always appending a timestamp to the file name.

(Another way is of course to save it in the ASD.)

2 Likes

This block does not return the exact path of the file, it returns /storage/emulated/0/file.pdf when it is actually in /storage/emulated/0/download/file.pdf, how can I make it return the real path? ?
component_method

It will return complete file name/path instead of correct file name/path. The method just prefixes external storage path and does not check if file really exists there or not.

hello, i have a problem with the extension. I don’t get a list, I have permission to save
blocks(18)

Remove file://

1 Like

If you trying it in Android 11 then you need to grant MANAGE_EXTERNAL_STORAGE permission from Settings.

If not granted then you will only get list of folders and files created by app itself.

2 Likes

… and media files (to be precise).

1 Like

i use your custom webview extension for download purpose and it work
but it save in /storage/emulated/0/Android/data/com.myprojectname/files/TempDownload/+label1 text
so i want to show the download files in custom folder like storage/emulated/0/Wallpapers
i use this filetools to move but not working
please reply i am waiting

whats ur android version? and show ur blocks

Android 11
When download complete
Move file from (location)
To (location)

You can no longer write / save in any folder of the external storage on Android 11. You have to copy / move it (a non-media file) to one of the Shared folders (/Download or /Documents).

See also here:

2 Likes

I have a request. Please do it please. Add copy & replace feature in this entension. I badly need this please. Thanks you so much​:white_heart:

Are you sure that should be implemented in Extension ?
I don’t think so.

Yes, some of our app need the file with same name. So, after we download we need to copy & replace old file. It will help us a lot. You are a big coder. Can you help us by adding this features? I am a big fan of yours. Please give us a update with this option​:white_heart:

Why not use Copy or Move method?