Mac OS renaming of folders to .folder

I have a Macbook pro running Big Sur 11.6


I have dozens of folders in multi lever sub folders with names using the pattern xxxx.com, xxxx.info, xxxx.net, xxx.help, xxx.report etc.


This morning my Mac decided to copy all of these and rename them with a .folder extension, such as xxx.com.folder.


The original folders were left in place however they cannot be opened. If you try to open the folder in Finder it pops up an alert saying... 'There is no application set to open the document “xxx.com”'. There is no blue 'folder' icon nect to the folder name in Finder. Instead there is a grey/white document icon.


When I rename the new folkders from xxx.com.folder to xxx.com, they are unable to be opened.


I am assuming the OS thinks it is a file not a folder. See screenshot below.



Note that the original folders still open in other programs like Dreamweaver and FTP programs with built in file browsers.


Thanks in advance for your help


Posted on Nov 2, 2021 9:20 PM

Reply
13 replies

Nov 3, 2021 3:42 PM in response to strategyinternet

Hello strategyinternet,


The issue may be in using the "." in naming the folders. The files may already have an extension. Adding another extension may be causing the problem.


If you rename the folder to a name without a "." in it, are you able to access the contents? Be sure to check to see if the file has a hidden extension. Here is how to make sure all extensions are visible: Show or hide filename extensions on Mac - Apple Support


If you are able to open the folders in other programs, perhaps you can use those programs to move the files to a new location.


Cheers.

Nov 4, 2021 6:45 AM in response to strategyinternet

strategyinternet wrote:

Thanks so much. I have always used folder names with a dot, which is required for the work I do. renaming the folder doesnt help. It still cannot be opened. File extension visibility is turned on


This seems like a poor practice in computing.



I would never recommend ". " in a file/folder name you are just asking for issues whether locally, Cloud, syn, all server communication.


this is reserved for —


—for hidden files/directories ex < .Trash>

—file extensions < .txt >

— path names < discussions.apple.com/thread >



This is so ubiquitous in computers it typically is not even mentioned in avoid list.


Avoiding Special Characters in Filenames:




Nov 5, 2021 3:30 PM in response to strategyinternet

In case it's having periods in the file name what happens if you change the "." to a "-"? Do the folders become viable again? If they do there's you can use Name Mangler to batch change all occurrences of "." to "-" on any item dropped on it:



You can also use it to remove the ".folder" from any time dropped on it?



I personally never use periods in a file name (except before the extension) as I've accidently create invisible files/folders (with "." in front of file name) and had a time getting them back visible again.



Nov 5, 2021 12:55 PM in response to Barney-15E

Thanks


I have just updated to Monterey and the issue is the same. I have narrowed this down to only folders with names ending .com


Creating a new folder named xxxx.com results in the folder having a document icon in finder and unable to be opened. Its pretty clear that finder thinks the folder is a file.


They can also still be opened in any other program with its own file browser such as FTP programs and development IDE's.


I have checked via command line and they still have the folder attributes, as below. The last 3 in the list below are folders behaving as files in finder. You will notice nothing different from another folder named _templates which behaves like a folder in Finder.


drwxr-xr-x@ 31 anthony  staff   992  4 Nov 13:44 _templates
drwxr-xr-x@ 35 anthony  staff  1120  4 Nov 13:39 getfitrapid.com
drwxr-xr-x@ 32 anthony  staff  1024  4 Nov 13:36 paleobaseddiet.com
drwxr-xr-x@ 34 anthony  staff  1088  4 Nov 13:19 smartdevicetips.com


Could it be that Apple has decided to make .com a reserved file/folder name in the same manner as .help


Nov 4, 2021 7:51 AM in response to strategyinternet

dots can be used freely within filenames, BUT: starting a filename with . makes the files/folder into an invisible file/folder.


How did you choose the names of the files/folders you used in your example?


I get SPAM emails with names like that. But I never save then, EVER.


I am concerned that these are files/folders generated by adware on your computer.



Nov 4, 2021 3:24 PM in response to strategyinternet

I don't have a Big Sur install anymore, but I can't replicate your problem in Monterey. I tried with both local folders and folders only located on iCloud Drive.

Can you go through the exact steps. Maybe I didn't do something the same.


All of the comments about file names and dots are chaff.

The only issue I can see is it wouldn't know how to open a .com file. Did they lose the directory attribute?

Can you look at them in the command line and see if they have the directory attribute?

Nov 4, 2021 12:36 PM in response to leroydouglas

Thanks. It is legal and fairly standard practice to name directories on unix servers with a dot (often the same name as the website files they hold (example xxx.com).


Developers generally use a system like GIT, which basically merges files from the local computer with those on the server, mapping the directory names / files etc, so if the server has a folder with a dot, then that folder will be downloaded / synced to the local machine.


I have been doing this for years, along with probably every other web developer and it has never been an issue until now, so Mac have obviously changed something and I really need a way to change it back, or Ill have to go to Windows.

Nov 4, 2021 12:40 PM in response to Grant Bennet-Alder

Thanks. The folder names dont start with a dot, but contain one. The folder names mirror the URLs of websites on a unix server. This is normal practice and a dot in a folder name is legal. A version control system such as GIT is typically used to sync files between the server and the local system on a web developers computer, which is why my local system has filenames with dots. The examples in the screenshot are merely some random domains created folders for as an example.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mac OS renaming of folders to .folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.