Jump to content

alfredappuser

Member
  • Posts

    32
  • Joined

  • Last visited

Everything posted by alfredappuser

  1. Thanks for this great workflow. Would be nice if it is possible to choose the host which should be wol'd.
  2. It seems you are located anywhere else on planet earth ;-) Thx for your help! I've published my workflow: https://github.com/jousch/folder2iso-alfredworkflow
  3. Finally creation of multiple iso files works: OIFS=$IFS IFS=" " foldersArray=({query}) for ((i=0; i<${#foldersArray[@]}; ++i)) do ir=$(expr $i + 1) folder=$(basename ${foldersArray[$i]}) folderMin=${folder//[[:blank:]]/} parentFolder=$(dirname ${foldersArray[$i]}) folderFinal=$parentFolder/$folderMin.iso hdiutil makehybrid -hfs -iso -joliet -o $folderFinal ${foldersArray[$i]} > /dev/null if [ -f $folderFinal ] then echo "$ir: $folderMin.iso created" else echo "$ir: Creation of $folderMin.iso went wrong!" fi done IFS=$OIFS
  4. EDIT: The problem were the double quotes. Now following works with a single folder: FOLDER=$(basename {query}) FOLDERMIN=${FOLDER//[[:blank:]]/} FINALFOLDER=~/Desktop/$FOLDERMIN.iso hdiutil makehybrid -iso -joliet -o $FINALFOLDER {query} if [ -f $FINALFOLDER ] then echo "ISO file $FOLDER.iso is available on your desktop" else echo "File is not created! Anything went wrong." fi My next step is to extend code, that it also can handle multiple folders (each folder to iso file)
  5. Thank u for your reply :-) I have enabled all escaping options except "Backslashes" The following script now works.But if you look at the code, I've tried to create the complete output path in variables. But this does not work. For now it is ok, but I want to extend the workflow and for this it would be nice if this also works. Do you have an idea? FOLDER=$(basename {query}) FOLDERMIN=${FOLDER//[[:blank:]]/} FINALFOLDER="~/Desktop/$FOLDER.iso" FINALFOLDERMIN="${FINALFOLDER//[[:blank:]]/}" echo $FINALFOLDERMIN #hdiutil makehybrid -iso -joliet -o $FINALFOLDERMIN {query} hdiutil makehybrid -iso -joliet -o ~/Desktop/$FOLDERMIN.iso {query} if [ -f ~/Desktop/$FOLDERMIN.iso ] then echo "ISO file '$FOLDER'.iso is available on your desktop" else echo "File is not created! Anything went wrong." fi
  6. Thx for your reply. If I run the following script within bash it works / on File Action it don't works: QUERY="{query}" if [ -d "$QUERY" ]; then PARENTDIR=`dirname $QUERY` DIR=`basename $QUERY` FILEEXTENSION=".iso" cd $PARENTDIR mkisofs -o $DIR$FILEEXTENSION $DIR fi Are there any special things to set?
  7. Hello, Actually I'm trying to generate an alfred workflow which make iso out of selected folders in finder. The File Action is working. But my problem is, how can I execute Shell Commands in the parent folder, so that I can run hdiutil, etc... All experiments went wrong.. Maybe anybody has a tipp for me? thx
×
×
  • Create New...