Last active
May 5, 2023 10:51
-
-
Save psu/ea3bee9fbcfd9db8368153874dae6350 to your computer and use it in GitHub Desktop.
handle-files.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change encoding for text file | |
iconv -f "ISO-8859-1" -t "UTF-8" "${input_file}" -s > "${output_file}" | |
# Remove tags and move to Archive folder | |
for file in {query} | |
do | |
# remove tag information in extended attributes, FinderInfo contains color info | |
xattr -d com.apple.metadata:_kMDItemUserTags "$file" | |
xattr -d com.apple.FinderInfo "$file" | |
# move file | |
mv "$file" "$archive_path" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment