{"id":2973,"date":"2011-09-25T21:55:17","date_gmt":"2011-09-25T11:55:17","guid":{"rendered":"http:\/\/mingersoft.com\/blog\/?p=2973"},"modified":"2011-09-25T21:55:17","modified_gmt":"2011-09-25T11:55:17","slug":"automate-removal-of-mac-double-files-on-windows","status":"publish","type":"post","link":"https:\/\/mingersoft.com\/blog\/2011\/09\/automate-removal-of-mac-double-files-on-windows\/","title":{"rendered":"Automate Removal of Mac Double Files on Windows"},"content":{"rendered":"<p>Well, I haven&#8217;t found a way for Mac OS X Lion to clean up its double files (i.e. the ._ files that are created when actual files are created on a Windows share) so I have decided to tackle it from the Windows side. On my Windows Home Server 2011 box I have written a small PowerShell script to take care of the removal of the files on my DriveBender pooled storage volume.<\/p>\n<p>So here is the script:<\/p>\n<blockquote>\n<pre>X:\r\ncd \\\r\ncd '.\\ServerFolders\\Downloads\\Torrents - Started'\r\nGet-ChildItem \"._*.*\" -Force | Remove-Item -Force<\/pre>\n<\/blockquote>\n<p>This script only clears out the offending files in one folder (i.e. the folder on the box which loads the torrents for downloads which jams when a Mac Double file appears) but you could extend it to traverse folders and then schedule it to run automatically (I have it running every minute and it only takes a few seconds to execute at most).<\/p>\n<p>Bear in mind, you might need to change your PowerShell execution policy to run local unsigned scripts using the following PowerShell command:<\/p>\n<blockquote>\n<pre>Set-ExecutionPolicy RemoteSigned<\/pre>\n<\/blockquote>\n<p>This will turn off the requirement for local PowerShell scripts to be digitally signed while still enforcing remote scripting to check for a digital signature.<\/p>\n<p>Hope this is handy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, I haven&#8217;t found a way for Mac OS X Lion to clean up its double files (i.e. the ._ files that are created when actual files are created on a Windows share) so I have decided to tackle it from the Windows side. On my Windows Home Server 2011 box I have written a &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/mingersoft.com\/blog\/2011\/09\/automate-removal-of-mac-double-files-on-windows\/\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[348,152,151,18,211],"tags":[10,1686,1595,2246,1685,1287],"class_list":["post-2973","post","type-post","status-publish","format-standard","hentry","category-macos","category-microsoft-operating-systems-technology","category-operating-systems","category-technology","category-windows-home-server","tag-apple","tag-mac-double","tag-mac-os-x","tag-microsoft","tag-torrent","tag-windows-home-server-2011","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mingersoft.com\/blog\/wp-json\/wp\/v2\/posts\/2973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mingersoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mingersoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mingersoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mingersoft.com\/blog\/wp-json\/wp\/v2\/comments?post=2973"}],"version-history":[{"count":0,"href":"https:\/\/mingersoft.com\/blog\/wp-json\/wp\/v2\/posts\/2973\/revisions"}],"wp:attachment":[{"href":"https:\/\/mingersoft.com\/blog\/wp-json\/wp\/v2\/media?parent=2973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mingersoft.com\/blog\/wp-json\/wp\/v2\/categories?post=2973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mingersoft.com\/blog\/wp-json\/wp\/v2\/tags?post=2973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}