利用Automator创建脚本。
选择服务类型并找到run shell script。
做如下设置:
- 将““服务”收到选定的”一栏选择:“文件或文件夹”;
- “传递参数”一栏选择:“自变量”。
然后键入以下:
for f in "$@"
do
if test -d "$f"
then
rm -r "$f"
else
rm "$f"
fi
done
确定保存即可。
利用Automator创建脚本。
选择服务类型并找到run shell script。
做如下设置:
然后键入以下:
for f in "$@"
do
if test -d "$f"
then
rm -r "$f"
else
rm "$f"
fi
done