[Thunar-dev] Custom actions

André Miranda andre42m at gmail.com
Wed Mar 6 16:16:11 CET 2019


Hi Dani,
 From what I could understand, you want to move files from blog_web to 
blog_src.
For me the snippet you provided works as expected, I just had to use 
quotes on mv "$source" "target" so whitespace is correctly handled.

By the way, I'm using zsh as the system default shell, but I think that 
substitution works on bash too.

It may be helpful to launch Thunar from terminal (thunar -q && thunar) 
and watch out for error messages.

HTH,
Andre Miranda

On 06/03/2019 08:31, Dani wrote:
> Hello:
>
> I'm trying to do a personalized action. In this case I try to move a 
> file from one folder to another.
> This command works well in the terminal more when I put it as a custom 
> order it will not
> If I'm not mistaken, the error is in the replacement.
>
>
> for i in %F; do source=$i; moveTo="/blog_src/"; 
> target="${source/\/blog_web\//$moveTo}"; mv $source $target; done
>
>
> This work fine on terminal:
> for i in "/home/dani/blog/blog.org/blog_web/tprd/1819/file1.odt" 
> "/home/dani/blog/blog.org/blog_web/tprd/1819/file2.odt"; do source=$i; 
> moveTo="/blog_src/"; target="${source/\/blog_web\//$moveTo}"; mv 
> $source $target; done;
>
>
> Is this an error or am I doing something wrong?
>
>
> Very thanks!
>



More information about the Thunar-dev mailing list