You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm fan of you work. Recently, I was developing Action that compresses the files & folders like mac's native compress feature (when we right click on files and directories) without meta directories like __MACOSX and .DS_Store. I created myself but somehow it doesn't work on Documents & Downloads dir and don't know how to resolve it.
But Why?
When we send zip to non-mac users they get unwanted __MACOSX and .DS_Store directories.
Hence, I'm raising this feature request in this actions to get them as a package.
Here's my existing work of shell script:
# Function to create zip file name based on inputscreate_zip_name () {
if [ "$#"-eq 1 ];then# Single file or directory
inputPath="$1"
inputBaseName=$(basename "$inputPath")if [ -d"$inputPath" ];thenecho"${inputBaseName}.zip"elif [ -f"$inputPath" ];thenecho"${inputBaseName%.*}.zip"fielse# Multiple files or directoriesecho"Archive.zip"fi
}
# Initial directory and zip file setup
initialDir=$(dirname "$1")cd"$initialDir"
zipFileName=$(create_zip_name "$@")# Execute zip command excluding unwanted metadata files
zip -r "$zipFileName""${@#$initialDir/}" -x '**/__MACOSX' -x '**/.DS_Store'# Use AppleScript to select the ZIP file in Finder
osascript -e 'tell application "Finder"' -e "activate" -e "select POSIX file \"$(pwd)/$zipFileName\"" -e 'end tell'
Screenshot
The text was updated successfully, but these errors were encountered:
Description
Hi 👋🏻
I'm fan of you work. Recently, I was developing Action that compresses the files & folders like mac's native compress feature (when we right click on files and directories) without meta directories like
__MACOSX
and.DS_Store
. I created myself but somehow it doesn't work onDocuments
&Downloads
dir and don't know how to resolve it.But Why?
When we send zip to non-mac users they get unwanted
__MACOSX
and.DS_Store
directories.Hence, I'm raising this feature request in this actions to get them as a package.
Here's my existing work of shell script:
Screenshot
The text was updated successfully, but these errors were encountered: