|
|
Remove hidden OS X files from Windows volumes
Nice to see my hint posted here. I did find one bug however. Ejecting a volume will result in a .DS_Store file being created again. I've found a solution and I will post a new version of the program on my site soon.
Remove hidden OS X files from Windows volumes
Warning (I think): The script should also escape special characters, as has been previously posted on this group, http://www.macosxhints.com/article.php?story=20011217040113759
---
Remove hidden OS X files from Windows volumes
Hello everyone,
No need to escape the characters because the files being searched for do not contain those special characters which need escaping. The script is using find to search the directory chosen by the user for the specific files. The script is safe. However, I do see a problem ...the script assumes you are choosing a Volume or Networked volume...if you choose a folder on that volume ... when the program goes to eject it can't. So the volume never gets ejected or unmounted. Here is the work around I came up with...
Trekvogel I hope you don't mind I modified the script to address the problems and run more efficient. Feel free to use my modified code as your own. Here are the changes... The script will now force the user to choose only a Networked volume (Non local volume) and will search the entire volume for the specific files. Opposed to searching certain folders - Reason being is why would you ever want to leave these files on a Operating System that no use for them. • The beginning of the script has been modified to filter out local volumes. • The open handler of this script has been modified to allow multiple disks to be processed via Drag-N-Drop • The script has been broken down into 2 functions for efficiency. searchVolumes(x) and createNetworkList(y) Take code below, put it into a new script and save it as an application. You are done. ---
Remove hidden OS X files from Windows volumes
Thank you very much for your tips, I appreciate the feedback I get and I will look at it. I will stay with my original code for now however. Because the script should also work on folders, not only Volumes. That is why you're asked wether you want to eject or not. I do plan to have the script check wether you're cleaning a folder or a volume and act on that knowledge. As said I hope to put a new version on my site asap with some enhancements and mostly fixing the bug that .DS_Store is being created when ejecting.
Remove hidden OS X files from Windows volumes
The file names are ok but the quotes around the volume name will escape neither backquote (`) nor dollar ($).
Remove hidden OS X files from Windows volumes
True. Single quotes would probably do it instead of double ones, but I suspect it's better to use the AppleScript operator quoted form of instead.
---
Remove hidden OS X files from Windows volumes
After some experimenting and reading I share Andys recommendation. `quoted form of posix path of a' seems to be the the elegant solution. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.40 seconds |
|