Name problem -File Extension-

please advise
HOW i can delte /mnt/sdcard/download
i want just name file

@Taifun

مرحباً أخوي @e5fdb899f010520e2cd5

أرسل لنا صورة من الكود وإن شاء الله أقدر أساعدك

You mean remove the part /mnt/sdcard/download/ from the listing?

image

This does exactly what it implies, it replaces the segment “/mnt/sdcard/download/” from whatever is contained in the value of “filename” by nothing (the replacement block is an empty block) and saves it in trimmedfilename.

You can have any name holder instead of the ‘global filename’ or ‘global trimmedfilename’ variables.
However, while the trimmed text is suitable for displaying the selection, if this is meant to load and present the file, you may need the fully qualified path, that means with the “/mnt/sdcard/download/” (or alternatively, something with a couple of leading “/”), so it would be advisable that you retain both the fully path name alongside the trimmed one. Should the user select entry #2, then you take the entry #2 of the list that has the complete path (unless you have whatever logic is needed to re-attach that path before the load).

Use “spirit” block to divide text to two parts.

First, Create new variable (for example: NewVar) and join it with (create empty list) block.

Do the following:

For each item in list (your list files)
Add item to list (NewVar) item (spirit text(item) at (mnt/sdcard/download))

Now you got a new list of your files list without (mnt/sdcard/…etc) (NewVar) list.

how i can do it ?
please

You may have to check with Taifun since this is his extension, but I have a hunch that “directoryName” should not start with “file:”

if in doubt, check the documentation https://puravidaapps.com/file.php

FileListAsync
Create a list of filenames of a given directory.
The result will be provided in the AfterFileListAsync event.
The complete path to these files is provided. You can filter by extension. To get a list of all files, use * as extension. If a directory starts with file:/// you can specify a complete path to the directory. To include files of all subdirectories, set includeSubdirectories to true, else to false.

Taifun

can you help me please @Taifun

you already received a good answer from @CBVG
what have you tried?
please provide a screenshot of your relevant blocks
you might want to elaborate…
what happens? what do you want to happen instead?
Taifun

i don’t understand what you mean