Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-09-07 21:09:07

fixit
Member
Registered: 2015-01-19
Posts: 82

Custom action problem

I have this as a custom action.

It is not quite working right.

convert -resize 1024X768 %f %fsmaller.png

I need the original file name with smaller appended to it.


small_OA_How_Food_Portions.pngsmaller.png

I do not need the "smaller.png" part at the end.

Thanks.

Last edited by fixit (2022-09-07 21:12:05)


Ubuntu-Mate 18.04 and 20.04

Offline

#2 2022-09-07 23:34:09

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 9,211

Re: Custom action problem

I can't get this to fit inline, so you'll need to create a script with the following content:

#!/bin/bash

convert -resize 1024X768 $1 ${1%.*}smaller.${1#*.}

...and make the script executable.

Then in the custom action, make the command "/path/to/script %f" where /path/to/script is the full path and script name.

Offline

#3 2022-09-08 01:41:00

fixit
Member
Registered: 2015-01-19
Posts: 82

Re: Custom action problem

Thanks for your help.


Ubuntu-Mate 18.04 and 20.04

Offline

Board footer

Powered by FluxBB