You are not logged in.


Hello!
I'm trying to get this one-liner to work in a custom action, in Thunar:
for f in *.xlsx; do /home/martin/.local/share/pipx/venvs/ofxstatement-handelsbanken/bin/ofxstatement convert -t handelsbanken "$f" "${f%.xlsx}.ofx" ; doneWhat it does is that it calls a program that I installed with pipx, and converts xlsx-files to ofx-files (pretty obvious
)
Running it in a terminal works just fine, it converts all the .xlsx-files into .ofx-files.
When highlighting a file with an .xlsx-extension the action shows up, but clicking it does nothing.
Under "Appearance Conditions" I've the following patterns:
File pattern: *.xlsx
Appears if selection contains: Other Files
Is there something that I'm missing here?
Could it be that it is a python-program?
Regards
M
Last edited by MitraMai (2026-04-21 20:43:50)
Offline


The command interpreter used by custom actions isn't a complete shell, so special characters will throw it off. To get around this, just run the command through a sub-shell in the custom action:
sh -c 'for f in *.xlsx; do /home/martin/.local/share/pipx/venvs/ofxstatement-handelsbanken/bin/ofxstatement convert -t handelsbanken "$f" "${f%.xlsx}.ofx" ; done'Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline


Thanks! That did the trick!
Offline
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 524.5 KiB (Peak: 525.48 KiB) ]