Deleting ._ files in Windows

At work we use iMacs for workstations but Windows for servers. There are some nuisance when sending files from OS X to Windows. Filename lengths, network connections, hidden files – just to name a few.

In OS X, there are hidden files that start with ._ which become visible when viewed in Windows. It’s usually not a problem. It becomes a problem when you are working with Joomla. If you download and unzip Joomla, then transfer the files to a Windows machine, you will get a ._ for each file and folder. This bad because in the Joomla system, there is an XML file for each components, modules, plugins, themes, etc that describes it. There is also a list of files in that XML file. You will probably get errors in the Joomla admin interface because of those ._ files.

Here’s the command to get rid of them in Windows. Open up your command prompt and enter the following command…

del /A:H /S /Q [location] ._*

The del command means delete. The A switch selects files based on an attribute. The H means hidden attribute. The S switch is used to search subdirectories within the [location]. The Q switch is quite mode and is optional. [location] is obvious so replace this with the path of where you want to do the deleting. Finally, the .* means files that start with . and the * is a wildcard.

Make sure you check to make sure there are no files that begin with ._ that you need.

8 thoughts on “Deleting ._ files in Windows

    • not using the “.” as a wildcard for a single character. the filename starts with “._”. the command works for me. should i have wrapped the ._* in quotes?

      Like

  1. Thanks,,, It works well… only thing is…. I was too lazy to type in the folder path so i just put in “C:” and it’s taking forever to erase a ton of stuff.. hope none of them are important operating files…

    Like

    • in terms of windows, microsoft don’t generally use file names that begin with a period. it’s more of a *nix/osx thing. unless you’re using a program that may have been ported over or settings. for instance if you are using keys for encryption or connection, it may delete them.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s