You are not logged in.
Pages: 1
Hi all,
I'm trying to build a custom action in Thunar to change files date and time using the touch command.
My best guess is:
xfce4-terminal --working-directory %d -x "echo 'Inserisci nuova data e ora nel formato YYYYMMDDhhmm.ss'; read dataora; touch -a -m -t $dataora %f"
but this gives me a "Failed to execute child process [...]. Failed to execve. File or directory doesn't exist." (I'm translating the Italian message...).
In the error message %f is correctly replaced by the file name.
Any other option doesn't even give me any message: I've tried without calling the terminal in the beginning, with bash -c, etc...
Nothing works.
Do you have any suggestion or alternative solution?
Thanks
Bye
Last edited by sbaguz (2021-01-16 14:32:26)
Offline
Hello and welcome.
Use bash -c like this:
xfce4-terminal --working-directory %d -x bash -c 'echo "Enter date (YYYYMMDDhhmm.ss"; read dataora; touch -a -m -t $dataora %f'
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
One giant step for human kind...
The previous error has been fixed, thank you very much!
Now, quite strangely, it's the touch command that gives me an error in the date format (which is obviously correct...).
Last edited by sbaguz (2021-01-16 14:27:28)
Offline
The command I posted works for me. Also note that I changed the location of the single and double quotes for it to work properly.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Yes, I had noticed it, but I didn't think it was so important...
But you are totally right: inverting the position of single and double quotes made it work.
Thanks again.
Offline
Pages: 1
[ Generated in 0.008 seconds, 9 queries executed - Memory usage: 546.59 KiB (Peak: 547.44 KiB) ]