File Naming: Cross-Platform Advice

Hey, I’m working on sound files (mp3’s) and was wondering what the restrictions are for special characters in the file names, like forward-slash or periods, commas, etc. ? I remember a long time ago forward-slash was not recommended, for example. I want the file names to be cross-platform readable, and I’d like to use a “spacer” between some words. Been using a dash- Is a period too weird? Are there any that have special techie meanings? Also, what’s the character number limit? Thanks.

I’d recommend sticking to letters, numbers, _, and -. . are, to my knowledge ok, but I think best to avoid if possible. /, \, : will definitely cause issues. Also, assume file names to be case-insensitive (on some OS’s, filename.mp3 and FILENAME.mp3 are the same file). Windows also has a restriction on the number of characters a file name can have. I’d say a good rule of thumb is to keep your file names under 32 characters (though that’s not the limit on Windows)


I agree with @dustinknopoff.

I would use _ or - to break up words. Periods can screw up parsing for the extension for some software. Avoid spaces, as some software has difficulty parsing that. (Looking at you, business Dropbox and your stupid naming convention Dropbox (Company Name).)

Windows, and I believe macOS also have limits on path length, so the filename plus whatever folders it is in. Windows is 247-ish, macOS is 1024, Linux is 4096.


Good advice from @dustinknopoff and @JohnAtl. Best to use the lowest common denominator; you don’t know what service your file will eventually land on.

This relates to OneDrive:

Here’s the link if you want to see the whole article:

1 Like

Second, third and fourth all the above – and note that naming is not necessarily a cross-platform issue alone. It can be an issue with different software on the same platform.

1 Like

Those DOS names just keep coming back.


No spaces, don’t use a period, some systems key on that for file types and get confused if there is more than one in a filename. The only special characters to use are - or _

Different systems will use other characters for special things so don’t expect them to stay in a filename.

Assume filename case insensitive as that is the worst case.

As @JohnAtl says the restrictions are usually on path length not filenmae but I try to keep mine to less than 48 characters.

Define a set format for dates and stick to it. I use YYYY-MM-DD_ in front of all date specific files for easy sorting.


Great advice, thanks. I had some expectation I guess that file naming rules might have loosened up a little over time, you know like with emoji’s or something by now :smile:, but looks like conservative is the way to play it. I’m a little disappointed no one gave parenthesis the okay. Good point about case-insensitive. Thanks again.

1 Like

If it helps, it used to be worse. HP mini computers that I worked on were limited to 5 character filenames, no folders.

1 Like