Apple Intelligence now features Image Playground, Genmoji, Writing Tools enhancements, seamless support for ChatGPT, and visual intelligence.

Apple Intelligence has also begun language expansion with localized English support for Australia, Canada, Ireland, New Zealand, South Africa, and the U.K. Learn more >

You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Is there a proper way to name files?

I know that folders can have spaces in the name, but what about actual file names themselves? Is it OK to name our files with a space or should we just use a "_" to be safe? What could go wrong if we use a space in the file name? What other characters should we avoid in file names?
Thanks!

G5, Mac OS X (10.4.7)

Posted on Jan 10, 2007 8:41 PM

Reply
10 replies

Jan 12, 2007 8:31 AM in response to Tom Gewecke

The article I refer to was somewhat vague to me and I guess my first statement of "adopting a new standard" is incorrect/misleading as I believe it was an adoption of the rest/more of the current standard as opposed to an all adopting an "all new" standard. Standards don't need to be followed 100% for something to be "compliant". This is an area that is gray to me as I understand it is also some sort of proprietary Apple code. The trade names and underscore situation I have discovered on my own.

I am quite certain I have a copy somewhere on an external HD but I am waiting for my third power-cord for my G4. I gave up on replacing battery connectors and now it heats the cables until the insulation melts away shorting it out. I will not connect externals to the MBP as they don't work properly and must be repaired when I try to use them in 3.9. I have already lost one HD and can't afford to lose another at the moment. Unfortunately if it doesn't arrive today or tomorrow I will not be able to post it as my .Mac trial is about up and I have no use for it to warrant purchasing a full account.

None of these files have been named pre OS X and all of these HD's, folders, files and my file naming convention I have used since 10.0. OS X.4 and Quick time have tightened their adherence, and not necessarily changed, to different standards, ISO, IEEE, MPEG, ASCII etc. One that I believe to be a major problem in 10.4 is with the ISO time-codes as equipment and apps alike do not convert or correct the "normal errors" properly.

I'm quite certain even this problem is caused in this "I/O Kit" as at least two separate OS architectures come together here possibly 3 (I am clueless how/if classic fits into the picture here). Then it's supposed to run on three different processors w/ various supported and "unsupported" HW configurations. Quite an incredible accomplishment IMO. Something was bound to be overlooked/misplaced/added/deleted especially when one looks at the speed at which all this conversion took place. I just wish that kernel panics made others as nervous as I and would cause one to report them to Apple. The amount of HW destroyed on my PB G4 running 10.4 and a MBP that wants to act like a PPC is enough for me to be convinced me that the situation is very serious.

Here's what others experience as well, in this situation I believe it is the extensions creating the problem. Unfortunately I read hundreds of pages a day as my MBP is useless for what I bought it for (iMovie) and I have nothing to do but to try and fix it. A lot of the self proclaimed experts on the various Apple boards believe that OS X.4 and a MBP are supposed to be slow and sluggish and that the problems that abound are "normal" or acceptable. IMO the iMovie board in particular is full of outdated or misinformation.

http://discussions.apple.com/message.jspa?messageID=3742429#3742429

I believe I may have stumbled across it from this email or in another Apple link if not a Developer Reference Manual. Adobe has issues with characters at the moment as well. I have thousands of files that can't be browsed in the PS browser as certain file names are shutting it down. No report being produced anywhere so I can't narrow it down. These files and folders were all named and organized in PS and I have used them, cross platform, for years without a problem. The only way to access these folders/files are by booting into 10.3.9 or less on my G4.

http://docs.info.apple.com/article.html?artnum=301984
http://docs.info.apple.com/article.html?artnum=302231

Hello from Apple!
Christopher at Apple Service & Support thought that you might find this article useful. We hope that it helps resolve your technical issue.
Link:
http://www.info.apple.com/kbnum/n106272


You can't empty the Trash or move a file to the Trash in Mac OS X
In Mac OS X, each user account has a separate, invisible Trash folder that is in the home folder. When you view contents of the Trash, you see only items you placed there and not the Trash folder of any other accounts. If other writable volumes are present, you may also have individual Trash folders on these volumes.

How to delete a file


Drag an item's icon to the Trash (in the Dock), or select the item and press Command-Delete.
Choose Empty Trash from the Finder menu.


Tip: If you're trying to delete a file that wasn't completely downloaded or copied, check out this document.

Tip: In Mac OS X 10.3 Panther or later, you can securely delete items by choosing Secure Empty Trash from the Finder menu.

If you change your mind about deleting the item before you choose Empty Trash:

Click the Trash icon in the dock.
Drag the item out of the Trash.


If you can't empty the Trash or move a file to the Trash
For example, this message might appear when you try to empty the Trash: "The operation could not be completed because the item '(item name)' is locked."

First, try holding the Option key as you choose Empty Trash from the Finder's File menu.


Otherwise, you can check for these conditions:

Is the file locked?

If files are locked, unlock them before deleting or delete using the tips in the "Deleting locked files" section below. Also, see Mac OS X: Unable to Move, Unlock, Modify, or Copy an Item .

Do you have correct permissions to modify the file?

Every file and folder in Mac OS X has some permission settings to help define what you or other users can do with the file or folder, for example whether you may modify it or not. If see an alert box with a message that says you do not have "sufficient" privilege or permission, see the tips in the "Emptying the Trash" section of "Mac OS X: Troubleshooting Permissions Issues".


Does the file or volume have special characters?

Usually, Mac OS X can delete files whose names contain special characters, but sometimes you might need to follow this advice.

Note the name of the volume which the files are being deleted from. If you are not sure of the item's location, you can verify that by selecting it then choosing Show Info from the File menu. If the name of the volume contains any special ASCII characters, such as a bullet or trademark character, temporarily rename the volume so that it does not contain these characters.

Example: If you cannot delete files from a volume named "·Dox", rename the volume to "Dox". After the Trash is empty, restore the volume's original name as desired.

Examine the name of the files or folders you cannot delete. They should not contain a solidus ("slash", "/") character or any other special ASCII character such as a trademark, quotation mark, or copyright symbol. If the file does, remove the special character or slash from its name, then delete it.

Example: If you cannot delete a file named "Things/Stuff·", rename the file to just "t", then delete it.


Deleting locked files
Locked files can easily be deleted if you press Shift-Option or Option key combination while emptying the Trash (in Mac OS X 10.1 and later). For Mac OS X versions 10.0 to 10.0.4, use Show Info to deselect the item's Locked checkbox.

If you still cannot delete the item, start up your computer from the Mac OS X CD-ROM and choose Disk Utility from the Installer menu of the first screen. Use Disk Utility to verify and, if necessary, repair your disk.

Tip: When started up from CD, do not click Continue. Disk Utility is only available in the first screen. If you click Continue, restart the computer from the CD.

If a file can't be unlocked, you may not have permission to unlock it. See "Mac OS X: Troubleshooting Permissions Issues" to learn how to get write permissions.

If the issue persists, use Disk Utility's Repair Permissions feature to check your Mac OS X volume. For Mac OS X 10.1.5 only, download and use Repair Privileges Utility 1.1 instead.


Advanced tip about deleting locked files

If there are several locked files in the Trash, you can unlock them all at the same time at the command line. Follow these steps:

Open Terminal. It's located in /Applications/Utilities.

Type: chflags -R nouchg
Note: Type one space (not pictured) after nouchg in the line above, so that it ends in "nouchg ". Do not press Return yet.

Double-click the Trash icon in the Dock to reveal the contents of the Trash. If necessary, arrange the Finder window so that a portion of the Terminal window is still visible.
Press the Command-A key combination to select all files in the Trash.
Drag the files from the Trash to the Terminal window.
Note: This automatically enters the pathname for each file. This eliminates the need to individually empty multiple Trash directories, particularly when multiple disks or volumes are present.

Press Return. No special text message will be shown indicating that the command was successful.
Empty the Trash.

If the Trash does not empty or if you see a message in Terminal that says "usage: chflags [-R [-H | -L | -P]] flags file..." you most likely did not type the text in step 2 as indicated or did not leave a space. Repeat the steps if this happens.

Related documents
106237 Mac OS X: Unable to Move, Unlock, Modify, or Copy an Item
106712 Troubleshooting permissions issues in Mac OS X


Thank you,
Apple

FWIW

Jan 10, 2007 8:44 PM in response to seb29

Spaces in file names are not problematic unless you start moving them to other platforms that don't support the same file naming conventions as Mac OS X.

Don't use / (forward slashes) in file names.
Don't use periods to begin file names.
Don't remove the three letter suffixes from files whose icons appear to represent the application you want to launch them in, if you wish to use the Finder to launch the application. You can of course get most applications to recognize documents from their open and save dialog box.

Jan 11, 2007 1:48 PM in response to seb29

Here's a bit more. The Mac OS simply won't let you save a name with a : in it, but there's others you should avoid. Especially for any computer running any form of Windows that you may be storing them on, or sharing with users running Windows.

These are all characters reserved by the system in MS DOS.

? [ ] / \ = + : ; " , * |


In the Windows Joliet file system, these characters are not allowed.

? / \ : " * |

Jan 11, 2007 5:46 PM in response to seb29

10.4 adopted a new standard I forget exactly which one but it can be found out on Apple's website some ASCII standard I believe.

Typically the other posters are correct although somewhere I came across a very recently written Apple technical note on this subject and certain characters appear to be causing HD's to not mount/unmount and apps to hang, files won't delete or be emptied by trash etc. (OS 10.4) I have experienced problems with external HD's and noticed things like trade names typical OS names "iTunes" or "Applications" etc would cause problems as well, this has never been a problem in the past. I use the word "appear" as I beleive this is a symptom of a different problem and not the problem itself. I beleive the underscore is also improperly denying access (permissions) to the files by the owner for some reason as well. This is not supposed to happen and the underscore I believe has been part of the standard, that Apple has just adopted (? not 100% sure here but I believe 10.4+), for years.

FWIW

Jan 11, 2007 7:54 PM in response to Whacked1

certain
characters appear to be causing... files won't delete
or be emptied by trash etc. I have
experienced problems with external HD's and noticed
things like trade names typical OS names "iTunes" or
"Applications" etc would cause problems as well,


If you could find that reference, I would be interested in seeing it. The problems you refer to are normally caused by files which have been named on non-OS X (or non-Unicode) file systems and then imported into OS X HFS+, where filenames containing non-decomposed Unicode characters are illegal. I've not seen anything myself about new or different requirements in 10.4 for filenames created within OS X.

Jan 12, 2007 12:55 AM in response to Tom Gewecke

Hello all

I think another advice is also to avoid giving a very long name? I have few incidents either by the default application or that my colleague has named a file way too long like e.g.: test project_graphic_720by576_firstrundraft.mov, something like that, and when share between Windows platform and Macs, sometimes the Windows will reject the file because the file name is simply way too long... I had to manually re-name the file shorter before I can copy over

Cheers

Is there a proper way to name files?

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