Hi Guys,
I use a central NAS system at home. I have two computers connecting to it. One is a Windows 7 machine, and the other is a MacBook Pro.
Whenever I add to or browse the NAS, it leaves hidden folders called ".AppleDouble" which is hidden, and sometimes a file called ".DSSTORE" or something-or-rather.
I was after a batch file which scans a main directory folder and its sub-directories. ie "z:\school work" (which has sub-directories like "mathematics, english, etc" and delete any ".AppleDouble" files located in any folder.
Is this possible?
Kind regards, and thanks in advance
Scan a directory (and sub-directories) and delete some files
Moderator: DosItHelp
Re: Scan a directory (and sub-directories) and delete some f
Code: Select all
del /f/s/q/ah "z:\school work\.AppleDouble"
Re: Scan a directory (and sub-directories) and delete some f
Hi amel27,
Thanks for your quick reply.
Does that piece of code scan all sub-directories as well as the main directory? Sorry if it seems obvious, but I'm a bit rusty when it comes to batch/dos files.. Haven't played around with them in about 10 years.
So in other words:
Z:\school work\.AppleDouble
Z:\school work\maths\.AppleDouble
Z:\school work\english\.AppleDouble
etc..?
And also, would the script terminate if it scans a file and does not find the .AppleDouble file? Or would it just continue?
Thanks again..
Thanks for your quick reply.
Does that piece of code scan all sub-directories as well as the main directory? Sorry if it seems obvious, but I'm a bit rusty when it comes to batch/dos files.. Haven't played around with them in about 10 years.
So in other words:
Z:\school work\.AppleDouble
Z:\school work\maths\.AppleDouble
Z:\school work\english\.AppleDouble
etc..?
And also, would the script terminate if it scans a file and does not find the .AppleDouble file? Or would it just continue?
Thanks again..
Re: Scan a directory (and sub-directories) and delete some f
yes, switch /s enable search selected file in root folder and subfolders, switch /h find only hidden files... if hidden attribute may set or not, command syntax:
Code: Select all
del /f/s/q/a "z:\school work\.AppleDouble"