I’ve tested the one under “First my version of the TAR script:” and it worked
May I ask why use tar? Selecting files/folders in Finder, then right-click and Compress, creates zip files.
Zip and unzip files and folders on Mac https://support.apple.com/guide/mac-help/zip-and-unzip-files-and-folders-on-mac-mchlp2528/mac
Shortcuts are more cumbersome than QuickAction in menu showing on right click/ double click against any file or folder.If on Monterey, Shortcuts can do this easily.
It is also giving me same error message as below- with both bash and zsh shell script options configured.Here is another one https://superuser.com/a/680400
Tested and working in Big Sur for multiple files/folders. You can change .tgz to .tar
Code:n=$1 [[ -e $n.tgz ]] && { i=2; n="$1-$i"; } while [[ -e $n.tgz ]]; do n="${n%-*}-$((i++))"; done d=${1%/*} cd -- "$d" COPYFILE_DISABLE= tar -czf "$n.tar" -- "${@#"$d/"}"
Have you selected "Pass input as arguments"?It is also giving me same error message as below- with both bash and zsh shell script options configured.
Have you selected "Pass input as arguments"?
Shortcuts does do quick actions, just need to code the Shortcut to Quick Action vs prompting for files. And can add Shortcuts to Services menu, menu bar.Shortcuts are more cumbersome than QuickAction in menu showing on right click/ double click against any file or folder.
Kindly guide how to do Quick action to tar.
n=$1
[[ -e $n.tgz ]] && { i=2; n="$1-$i"; }
while [[ -e $n.tgz ]]; do n="${n%-*}-$((i++))"; done
d=${1%/*}
cd -- "$d"
file_name=$(basename $n)
COPYFILE_DISABLE= tar -czf $file_name.tgz -- "${@#"$d/"}"
Still same error coming:Fixed script for Monterey
Code:n=$1 [[ -e $n.tgz ]] && { i=2; n="$1-$i"; } while [[ -e $n.tgz ]]; do n="${n%-*}-$((i++))"; done d=${1%/*} cd -- "$d" file_name=$(basename $n) COPYFILE_DISABLE= tar -czf $file_name.tgz -- "${@#"$d/"}"
Does Quick Action needs any file or folder special permissions which I am missing on.Beats me, this was recorded on M1 12.5.1 (21G83), Run Shell Script version 2.0.3
View attachment 2046144
Normally, no.Does Quick Action needs any file or folder special permissions which I am missing on.