Page 1 of 1
Remove hidden files ".DS_store" from a folder
Posted: Fri Jun 15, 2018 1:16 pm
by diguimfodera
Hi every one!
My flows works with MAC and PC files. So, for MAC files, there is hidden files calls ".DS_Store". When I use "Ungroup" to process the PDF files for example "convert text to outlines" the pitstop server don't process this file and send it to Problem folder. So, when assembly job, re-mounting de original folder, always there is a missing file (in this case .DS_Store..) so the flows become slowing (waiting the time-out). The time out is high, like 60s, 120s etc, because I have complex flows and many files are handled on it.
Is there some way to remove this hidden file ".DS_store" from the original folder before sending it to process a completely flow?
How do I get it? Thanks!
Re: Remove hidden files ".DS_store" from a folder
Posted: Mon Jun 18, 2018 4:59 pm
by essexmate
Can't you just route files with extension ".DS_Store" direct to the Assemble job as soon as they are Ungrouped? Then they won't go through pitstop.
Re: Remove hidden files ".DS_store" from a folder
Posted: Mon Jun 18, 2018 7:17 pm
by ezFlow
Hello,
First save the amount of files in job - 1 in a private data, ex nbfiles=[Switch.Calculation:Expression="[Job.FileCount]-1"]
Then ungroup the job, filter out the ".DS_Store" and process the PDF files.
Then Assemble the job again.
Scheme Ungrouped job, and use [Job.PrivateData:Key="nbfiles"] for the number of files.
Re: Remove hidden files ".DS_store" from a folder
Posted: Tue Jun 19, 2018 9:52 am
by Padawan
Or another option: I usually use the Execute Command tool to recursively search for those files in the folder and remove them. This way you only need one flow element.
On mac these Execute Command settings should do the trick
On Windows you need to create a bat file with this content:
cd %1
del /s *DS_Store*
And then point the execute command to the bat file:

Re: Remove hidden files ".DS_store" from a folder
Posted: Sat Jun 23, 2018 6:36 pm
by diguimfodera
ezFlow wrote: ↑Mon Jun 18, 2018 7:17 pm
Hello,
First save the amount of files in job - 1 in a private data, ex nbfiles=[Switch.Calculation:Expression="[Job.FileCount]-1"]
Then ungroup the job, filter out the ".DS_Store" and process the PDF files.
Then Assemble the job again.
Scheme Ungrouped job, and use [Job.PrivateData:Key="nbfiles"] for the number of files.
Very good idea.Thanks I'II try it. Thanks
Re: Remove hidden files ".DS_store" from a folder
Posted: Sat Jun 23, 2018 6:39 pm
by diguimfodera
Padawan wrote: ↑Tue Jun 19, 2018 9:52 am
Or another option: I usually use the Execute Command tool to recursively search for those files in the folder and remove them. This way you only need one flow element.
On mac these Execute Command settings should do the trick
On Windows you need to create a bat file with this content:
cd %1
del /s *DS_Store*
And then point the execute command to the bat file:
Very nice way. I'II try it too. Thanks!!
Re: Remove hidden files ".DS_store" from a folder
Posted: Sat Jun 23, 2018 10:14 pm
by diguimfodera
Padawan wrote: ↑Tue Jun 19, 2018 9:52 am
Or another option: I usually use the Execute Command tool to recursively search for those files in the folder and remove them. This way you only need one flow element.
On mac these Execute Command settings should do the trick
On Windows you need to create a bat file with this content:
cd %1
del /s *DS_Store*
And then point the execute command to the bat file:
Padawan, great tip! It worked very well. I tested it including other unwanted kind of files (thumbs.db) .
Just one element on flow I solved my problem.
Thanks!!
Re: Remove hidden files ".DS_store" from a folder
Posted: Fri Nov 22, 2024 10:28 pm
by cwswitch
This is cool.
I'm not sure why mine was different, but my .bat file ended up being
Code: Select all
@ECHO OFF
cd "%1"
del /s /q /f /a .DS_STORE
Very handy solution thanks Padawan