advertisement
Forums

The Forum is sponsored by 
 

AAPL stock: $170.13 ( -0.05 )

*Cached every 60 seconds. For live updating, Click Here

You are currently viewing the Tips and Deals forum
automator help
Posted by: Fritz
Date: August 16, 2017 12:37PM
I'd like to delete a bunch of ".DS_Store" files that are hidden in the music folders of the USB drive I use in the car. Every now and then the playback gets dumb and some have pointed to this possibility.
I would think that Automator could do this, but thus far my attempts don't cut it at all.
Anyone lend an idea?



!#$@@$#!

all I need to know I learnt from Bugs Bunny on Saturday mornings.

The Howlin Souls - [goo.gl]
Options:  Reply • Quote
Re: automator help
Posted by: Bixby
Date: August 16, 2017 12:47PM
I believe automator can only directly access files that are indexed by spotlight, and I suspect those hidden files are not.

Though maybe use this info to use automator to do a terminal shell command: http://osxdaily.com/2012/07/05/delete-all-ds-store-files-from-mac-os-x/
Options:  Reply • Quote
Re: automator help
Posted by: Fritz
Date: August 16, 2017 12:55PM
Quote
Bixby
I believe automator can only directly access files that are indexed by spotlight, and I suspect those hidden files are not.

I suspect you're right

Though maybe use this info to use automator to do a terminal shell command: http://osxdaily.com/2012/07/05/delete-all-ds-store-files-from-mac-os-x/

any idea how I would get the command to point to a specific volume or folder?



!#$@@$#!

all I need to know I learnt from Bugs Bunny on Saturday mornings.

The Howlin Souls - [goo.gl]
Options:  Reply • Quote
Re: automator help
Posted by: rz
Date: August 16, 2017 03:11PM
If you want to limit it to a specific volume, then you would substitute the "/" after "find" to something like "/Volumes/drivename" where "drivename" is the name of the drive. So let's say my drive was called Files. You would type this:

sudo find /Volumes/Files -name ".DS_Store" -depth -exec rm {} \;
Options:  Reply • Quote
Re: automator help
Posted by: Marc Anthony
Date: August 16, 2017 03:51PM
I would use AppleScript and a shell command, rather than launching the terminal. The below code will allow you to choose any folder. If you always want to use a specific path, then copy the do shell script command in AppleScript Editor's Event Log after a run.

do shell script "find " & ((choose folder)'s POSIX path)'s quoted form & " -name '*.DS_Store' -delete"



Le po├Ęte doit vivre beaucoup, vivre dans tous les sens. - Verlaine
Options:  Reply • Quote
Re: automator help
Posted by: Fritz
Date: August 16, 2017 04:06PM
thanks both. that doed it.



!#$@@$#!

all I need to know I learnt from Bugs Bunny on Saturday mornings.

The Howlin Souls - [goo.gl]
Options:  Reply • Quote
Re: automator help
Posted by: hal
Date: August 16, 2017 09:47PM
I have tried many times to make something useful with automator and have failed EVERY time. Always end up back with applescript.
Options:  Reply • Quote
Re: automator help
Posted by: Article Accelerator
Date: August 17, 2017 01:28AM
Quote
Fritz
I'd like to delete a bunch of ".DS_Store" files that are hidden in the music folders of the USB drive I use in the car. Every now and then the playback gets dumb and some have pointed to this possibility.
I would think that Automator could do this, but thus far my attempts don't cut it at all.
Anyone lend an idea?

OS X has a built-in command called dot_clean: [developer.apple.com]

Mount the USB drive, open Terminal and enter dot_clean -v (with a space after the "v") then drag the USB drive icon onto the Terminal window and press return.

Example:
dot_clean -v /Volumes/myflashdrive

There's a discussion apropos to your issue here starting at 2017-06-24 ("David Charlap") that includes mention of some related third-party utilities:

[www.macintouch.com]
Options:  Reply • Quote
Re: automator help
Posted by: Fritz
Date: August 17, 2017 06:53AM
thanks AA.



!#$@@$#!

all I need to know I learnt from Bugs Bunny on Saturday mornings.

The Howlin Souls - [goo.gl]
Options:  Reply • Quote
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 232
Record Number of Users: 52 on November 20, 2014
Record Number of Guests: 847 on February 04, 2015