Tôi có cùng một vấn đề với âm thanh nổi trên xe hơi của tôi, 1 tệp / 2 là không thể phát được, bởi vì trình phát cho rằng tệp chấm được tạo bởi MAC OS là một tệp nhạc ... Sau đó, tôi thấy bài đăng này thực sự hữu ích, cảm ơn.
Vì vậy, tôi trở lại ngay bây giờ với một giải pháp cải tiến và miễn phí cho Mavericks:
- Tạo Ứng dụng Máy tự động để chạy tập lệnh AppleScript
Sử dụng tập lệnh này:
on run {input, parameters}
try
tell application "Finder" to set allDrives to the name of every disk whose local volume is true and startup is false
set driveName to {choose from list allDrives with title "DiskCleaner" with prompt "Disk to Clean and Eject:" OK button name "Clean and Eject" cancel button name "Abort"} as text
set getDriveIdentifier to "diskutil info " & quoted form of driveName & " | grep Ident | awk '{print $3}'"
set driveIdentifier to do shell script getDriveIdentifier
try
do shell script "find /Volumes/" & quoted form of driveName & " -name '.DS_Store' -type f -delete"
do shell script "find /Volumes/" & quoted form of driveName & " -name '.FBC*' -type f -delete"
do shell script "find /Volumes/" & quoted form of driveName & " -name '._*' -type f -delete"
do shell script "rm -rf /Volumes/" & quoted form of driveName & "/.{,_.}{fseventsd,Spotlight-V*,Trashes}"
display notification "Disk Cleaned"
on error
try
do shell script "sudo find /Volumes/" & quoted form of driveName & " -name '.DS_Store' -type f -delete" with administrator privileges
do shell script "sudo find /Volumes/" & quoted form of driveName & " -name '.FBC*' -type f -delete" with administrator privileges
do shell script "sudo find /Volumes/" & quoted form of driveName & " -name '._*' -type f -delete" with administrator privileges
do shell script "sudo rm -rf /Volumes/" & quoted form of driveName & "/.{,_.}{fseventsd,Spotlight-V*,Trashes}" with administrator privileges
display notification "Disk Cleaned"
on error
display notification "Can't Clean, Permission Denied"
end try
end try
delay 1
try
do shell script "diskutil eject " & driveIdentifier
display notification "Disk Ejected"
on error
display notification "Can't Eject, Disk in Use"
end try
on error
display notification "No Disk to Clean and Eject"
end try
end run
Lưu ứng dụng dưới dạng DiskCleaner.app chẳng hạn
Kịch bản này sẽ yêu cầu bạn chọn đĩa USB để dọn dẹp và đẩy ra. Sau đó, nó sẽ dọn sạch đĩa USB (thử với thông tin đăng nhập của quản trị viên nếu không thành công với thông tin hiện tại), sau đó đẩy ra nếu có thể.
Tất nhiên vẫn còn một số nơi để cải thiện, tôi đã tự viết kịch bản này!
Ngoài ra, bạn có thể linh hoạt để thêm các dòng mã để làm sạch nhiều tập tin hơn.
Thưởng thức!