FileTools : Some tools to work with files


** Working perfectly.

1 Like

I was right :sunglasses:

1 Like

Hey is it possible to sort(descending) files according to date of last modification?

Format of last modification date : dd-MM-yyyy

Yes you can do it using dictionary and list utils extension.
First convert all dates in timestamp and store all filenames and timestamps in dictionary.
Now sort timestamps using list utils extension and then get filenames according to timestamp.

There can be a lot of methods to do same and it is one of them.

1 Like

@vknow360 Copying a file (test.txt) from the assets to external storage does not work with Companion or with the APK.

Example:

/storage/emulated/0/test.txt
relative path: /test.txt

copyFormAssets.apk (5.0 MB)

TaifunFile ext. works. App Inventor Extensions: File | Pura Vida Apps (APK)

Blocks

3 Likes

ChangeLog Version 9

Bug Fixes

  • Fixed bug in CopyFile and CopyFileAsync methods which were not copying file from assets
    Thanks to @bodymindpower
  • Fixed bug in IsFile method which was returning false for every asset’s file

Changes

  • Some internal changes
  • Removed some un-necessary libraries (but somehow aix’s size increased :sweat_smile: )

Previous Version’s (that were available on Drive)

com.sunny.FileTools (1).aix (39.6 KB)
com.sunny.FileTools (2).aix (34.6 KB)
com.sunny.FileTools (3).aix (33.4 KB)

3 Likes

Greetings
How much I miss your guidance :relaxed:
Can I apply the ( Read from ) [ file extension ] block to CSV file in Firebase storage without downloading this CSV file ???
11 !

I checked it on Android 9 with APK:
It does not work.

copyFormAssets2.aia (63.8 KB)

Hi @bodymindpower
CopyFile method does not triggers FileCopied event so you will never get correct result from event.

Yes, but as you can see there is a button (Button3) to check it.

I shall check it as soon as possible.

Btw, it works on Android 7 with APK.

1 Like

It also works on Bluestacks in Companion.
I think issue is only on Android Pie and higher versions.

it also works on Android 8.1

I checked it again on several devices with Android 9 and 10:
It works. The problem with Note8 (Android 9) is now also solved after de-/installing the app.

So it’s working on Android 5, 7, 8.x, 9, 10.

1 Like

if i create files in android folder then will it effect my phone?, just asking

1 Like

I think no because i was deleted android folder once :grin: but nothing happened

Android folder is for apps to save necessary files which are needed to run app perfectly so I wouldn’t suggest you to write in Android folder unless it it very necessary.

1 Like

Is it possible to compare image size after selecting with image picker?

Which size are you talking about here?
File Size or Dimensions?