No such file or directory

I am new to KM and bought it for a particular need. I have hundreds of AppleWorks files which my wife was using when her laptop failed. She is now using Mavericks and needs to make these available too Pages.app or Word. I have an Automator workflow which will find hem in a folder and open them in AppleWorks in an older OS. This leaves me two tedious jobs–saving them in a special fodder with a Word format then changing the extension from cwk to doc. I have used Joe Kissell’s Take Control book and followed his steps. I “select for each file path in these collections” and select the directory with an “~” before users and the correct path to the directory. I then tell it to execute a shell script:

base=basename "$KMVAR_filepath" .$KMVAR_From
ext="${KMVAR_filepath##*.}"
path=dirname "$KMVAR_filepath"
if [ $ext == $KMVAR_From]
then
mv “$KMVAR_filepath” "$path/$base.$KMVAR_To"
fi

If I use F6 as the trigger it asks for the extensions–which i have already put in the program–runs and quits but makes no changes.

Thaks.

Ray

Whoops!! In using the clipboard I lost part of the script–here it is corrected.

base=basename "$KMVAR_filepath" .$KMVAR_From
ext="${KMVAR_filepath##*.}"
path=dirname "$KMVAR_filepath"
if [ $ext == $KMVAR_From]
then
mv “$KMVAR_filepath” "$path/$base.$KMVAR_To"
fi

You don't need a script for that, you can do it all in Keyboard Maestro. Something like this:

1 Like