File naming problem with Mac and Windows

Problem

I encountered a little problem today. We are using a Windows shared folder from Mac. On Mac, a space character at the beginning of a folder name is allowed, but not on Windows. When such a folder name is given to a shared windows folder from Mac, it was accepted, but never be renamed, nor deleted.

So, I went to the Windows machine that the shared folder resides, but I still couldn't rename on Explorer. The error is mysterious "Access is not allowed".

Solution

It seems that somewhere in Windows code, it is rejecting the operation to the folder because it has a space character at the beginning. So, I opened DOS prompt and used dir command with /X option to short the 8.3 name.

The 8.3 name was indeed without the space. So, I renamed the folder using the 8.3 name using ren command. It worked well.

The lesson is that you never name a folder with a space at the beginning of the folder name.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <code> <cite> <ul> <ol> <li> <dl> <dt> <dd> <p>
  • Lines and paragraphs break automatically.
  • Link to Amazon products with: [amazon product_id inline|full|thumbnail]. Example: [amazon 1590597559 thumbnail]
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Images can be added to this post.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.