How can I see invisible files?

One of my pdf utilities won't work until I remove the .DS_store file from the relevant folder.


How can I see invisible files and, if necessary, remove them? It's not under Finder > View or Finder > View > Show View Options. It's not listed in Help search. Ive tried using Tinkertool and relaunching the finder, but to no avail.

MacBook Air (11-inch Mid 2013), macOS Sierra (10.12.6)

Posted on Feb 5, 2018 4:07 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 5, 2018 5:52 PM

See if these Terminal commands work.


Hidden files - show: defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder


Hidden files - hide: defaults write com.apple.finder AppleShowAllFiles FALSE -boolean false ; killall Finder

21 replies

Feb 5, 2018 7:03 PM in response to Marja E

Cmd-shift-.

Repeat to hide files.


If you don't open the folder, it won’t create the file, so if you can manage your workflow to not open the folder until you’ve processed the files, you might be able to avoid having to delete them.

I imagine that may not be possible, but I can envision workflows where you just dump files into a folder, then process the entire folder.


Perhaps there is is a setting in the utility to ignore certain files.

Feb 9, 2018 9:04 PM in response to Marja E

Ok, first a simple one to just Delete the .DS_Store files on a selected folder (or folders).

  • Open Automator and create a New Service -- cmd-N, then select Service as the type.

    You should see a Library pane on the left and a blank workflow pane on the right.

  • At the top of the workflow pane, set it to:

    Service receives selected folders in Finder

  • From the Library pane, select Utilities
  • From the Actions list, drag the Run Shell Script Action into the workflow pane
    • Leave the Shell: /bin/bash
    • Set Pass input: as arguments
  • Replace the code for the shell script with:
for f in "$@"
do
  find "$f" -name ".DS_Store" -exec rm -f {} \;
done

Save the Service as something like "Delete DS_Store"

Here is a screen capture of the completed Service:

User uploaded file

To Use the Service:

In the Finder, right-click on a folder and choose "Delete DS_Store" from the Services submenu.

User uploaded file

Feb 6, 2018 6:28 AM in response to Barney-15E

If you can’t configure the utility to ignore the .DS_Store files, it would likely be better time spent building an Automator service that you can run on the folder to delete the file before processing the folder.

I’m not with my Mac at the moment, so I can’t offer a workflow to use. I imagine, based on the inability to see the file using cmd-shift-., it will need to use rm command in bash, possibly with find.


With the Automator solution, you’d just have to right-click on the folder and choose the service from the Services menu.


On another tack, does the PDF utility offer any support for some pre-process functions. If so, the same routine used in the Automator Service could be used to clean the folder before the utility processes the files.

Additionally, it may be possible to call the utility from the command line, you might be able to run a script that cleans the folder, then runs the utility to process the files.

What is the name of the PDF Utility? If I can get my hands on it, I might be able to come up with a solution.

Feb 6, 2018 3:19 PM in response to Barney-15E

I got it working with the Homebrew build. I couldn't get it working with the unix executable before.


So far it's either cpdf [file] [file] [file] -o shortname.pdf or cpdf -idir [folder] -o shortname.pdf.


I may then run it through ocrmypdf and k2pdf opt -mode copy -dev dx (I have a saved executable for that), or just through k2pdfopt.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I see invisible files?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.