SMB/CIFS and Slashes in Filenames

I am using an application that saves its files as packages. Inside the package is a file that has forward slashes in the filename such as file8/14/2010.xml. I am trying to copy this package from Mac to Mac using SMB or CIFS. One of the Macs is running Lion (Mac 1) and the other Leopard (Mac 2). I'm having the following issues:


When on Mac #1, if I copy the file to Mac #2 then go to Mac #2 to look at it, this particular file in the package ends up with each slash replaced by a character that looks like an "x" in a box.


When on Mac #1, if I copy to it a good version of the package from Mac #2, the file with the slashes does not get copied. When I open Mac #2's package over the network, the file does not appear in the package. If I screen share via VNC, the file is definitely in the package.


When on Mac #2, I can copy the file to a server and back via SMB and it is fine. I can do the same from Mac #1. Mac-to/from-Server seems to work fine but Mac-to-Mac does not.


Any ideas?

Mac Pro 2008/Intel iMac 2009/Macbook Pro, Mac OS X (10.7)

Posted on Aug 15, 2011 6:49 PM

Reply
7 replies

Aug 15, 2011 7:30 PM in response to etresoft

Interesting. I have not seen a colon. I've seen the "x in a box" character and the entire file go missing, but not a colon. Maybe the file not being displayed is the result of the colon?


My solutions so far are to zip it, copy it to the server, or email it from the one Mac while I'm on that Mac. If I don't do one of those things, the only way to get the file onto the other Mac is to use VNC and do one of those things remotely. Except for VNC, I can't zip it over the network or transfer it to the server over the network without it messing it up.


Is there a specification written somewhere that states that slashes in filenames are illegal/improper for SMB and CIFS? I'd like to forward such a document to the company that provides the software I'm having issues with.

Aug 15, 2011 7:38 PM in response to Badunit

What the heck. I tried to edit my post it it marked it as the correct answer. Slip of the mouse perhaps but I think the page jerked right as I was clicking. It is by far not the correct answer and now it looks to everyone like my post is answered and fewer people will read it as a result. This new forum software ticks me off sometimes.


I've posted my question again as another thread.

Aug 15, 2011 7:40 PM in response to Badunit

No, you won't see any colons because colons aren't allowed. Neither are slashes.


As for a specification, you can't get much more definitive than this: http://support.microsoft.com/kb/177506/EN-US


Good luck with your software. I can't think of any character that is more likely to cause problems in file names than a slash. The old MacOS system (circa 1999) was the only operating system that ever allowed you to use a slash.

Aug 15, 2011 7:50 PM in response to etresoft

The old MacOS system (circa 1999) was the only operating system that ever allowed you to use a slash.


I do not understand. Slashes in filenames are allowed in OS X. They even work fine over SMB in my experience when going from Mac to/from a Server, just not Mac to Mac (at least not in the case of the file I'm trying to transfer).

Aug 15, 2011 8:15 PM in response to Badunit

Badunit wrote:


I do not understand. Slashes in filenames are allowed in OS X. They even work fine over SMB in my experience when going from Mac to/from a Server, just not Mac to Mac (at least not in the case of the file I'm trying to transfer).

Slashes are not allowed in file names. The slash is the path delimiter. You can enter a slash in the filename of a file using the Finder. The Finder will silently translate the slash into a colon. If you look at the file using the Terminal, you will see that it is a colon. But try to use a colon in the Finder and it will refuse.


Samba probably has some similar feature as there are some Linux config files that use colons. Lion does not use Samba. It uses a new, proprietary SMB-compatible protocol built by Apple. It probably handles these files differently and that is why you are having trouble now.


No one should ever use colons in file names. Slashes should be impossible. How this software manages it is irrelevant. They should use neither. That is unambiguously wrong.

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.

SMB/CIFS and Slashes in Filenames

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