On an Android 12 tablet, I am trying to batch rename JPG's in a Sd-Card folder. I am using the External Storage example which as a base, works to choose the folder on a SD-card and display the JPG files. Besides that I am trying this example to actually move/rename the files:
found here.
The last part does not work.
Looking at the code I need the SourceFolder to start with. I do not know what the appropriate syntax is or where to find it. The only info I get starts with "Content://" which doesn't look right at all.
Besides that I don't even know if I can actually use this code to rename/move files on the Sd-card with all the file access permission changes of the last year in mind. There are dozens of files that are about 20MB a piece. Copy and delete isn't really an option.
Can somebody help.
Regards
B4X:
Sub FileMove(SourceFolder As String, SourceFile As String, TargetFolder As String, TargetFile As String) As Boolean
Dim source, target As JavaObject
source.InitializeNewInstance("java.io.File", Array(SourceFolder, SourceFile))
target.InitializeNewInstance("java.io.File", Array(TargetFolder, TargetFile))
Return source.RunMethod("renameTo", Array(target))
End Sub
found here.
The last part does not work.
Looking at the code I need the SourceFolder to start with. I do not know what the appropriate syntax is or where to find it. The only info I get starts with "Content://" which doesn't look right at all.
Besides that I don't even know if I can actually use this code to rename/move files on the Sd-card with all the file access permission changes of the last year in mind. There are dozens of files that are about 20MB a piece. Copy and delete isn't really an option.
Can somebody help.
Regards