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.
Comments
These comments were left on the original blog post. Comments are now closed — see About for how to get in touch.
Brad — 2012-04-09
Thank you so much for sharing this with me.
Conrad — 2012-09-03
Worked perfectly. The only thing is: you have to put a space before and after [location]. Once you do that, it deletes all of those files.
George — 2012-11-14
This guide is faulty. Charcter ”.” is wildcard for any single character.
sherwin — 2012-11-15
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?
D — 2014-01-13
Thanks for the help. I used a space like Conrad said and goodbye 2,000 unneeded files!!
Rara — 2014-02-07
Thank you, this was really helpful :)
Koco — 2015-01-28
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…
sherwin — 2015-01-28
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.