Test File doesn't like accent marks

21 views
Skip to first unread message

nmyshkin

unread,
Mar 25, 2026, 2:22:05 PM (6 days ago) Mar 25
to Tasker
I've run into problems with using the Test function to see if a file exists or not before performing another action.

My goal is to compare existing thumbnail images in one directory with epub files in a different directory, and eliminate the thumbnails for epubs which have been removed.

I've worked out gathering all the thumbnails in one variable so I can use that to set up a loop to compare with the existing epub files. The problem is that some of the file names include accented characters (author's names, even book titles) and the Test function (for a file) does not care for that.

Whatever the solution is (if there is one) it has to be very knock-down, drag-out basic, because I'm working with Android 2.1 and fancy plugins are not going to work.

I've been looking at the shell command "find" but I can't seem to arrive at a syntax that works. I have something like this:

find /sdcard/Nook -name %booklist(%index)

I know that shell commands can be persnickety about variables so I've tried a number of different approaches (one single variable, various combinations of single and double quotes, etc.) but I'm not getting a result.

Any suggestions?

nmyshkin

unread,
Mar 26, 2026, 12:31:01 PM (5 days ago) Mar 26
to Tasker
Mmm...research suggests this is a Linux issue which is not going to be solved by the tools at my disposal (certainly not on the device). Both shell scripts and Tasker procedures can deal with these file names but only when explicitly typed in as text. Once the text is replaced with a variable, nothing works.

I dreamed up a brute-force and draconian approach to this in the wee hours: delete ALL the cover images. Now the device must be forced to see the epubs as "new" so that whatever voodoo happens in the OS to extract cover images will occur. Kicking MediaScanner in the pants is not enough. But if all the epubs are moved to a "temp" folder and then moved back where they belong, they are seen as "new" and the cover thumbnails are regenerated--minus the ones for which the epubs no longer exist. Mission accomplished.

I had feared the internal databases would be mangled by this process, but I see no sign of phantom duplicate books and my reading positions are still correct. Still needs more testing and I hate it, but it may be the solution.

aa6vh

unread,
Mar 27, 2026, 11:27:37 AM (4 days ago) Mar 27
to Tasker
Are you using embedded Tasker variables in the filename, or does that Tasker variable contain the entire file name (including the path)? You might try the latter to see if that works.
Reply all
Reply to author
Forward
0 new messages