AEG Foundation

Geoscience Library of Applied Technology

Archive for the ‘6 Forums’


Forum – Using Underscores

Can you use an underscore in a file name?

Q:  A curator asked about using underscores in the file name and about how detailed the file name should be.

A:  Hi Xxxx –

You once asked me about the need to do all that underscoring when it comes time to naming and uploading PDF files.  Sorry I took to so long to get back to you on this one… buried in the piles.

The simple answer is “No” you don’t have to use them.  In fact, as we watch this library site evolve we’re seeing little “gotchas” creep in that we hadn’t anticipated… and this was one of them.  Surprise, surprise.

The original reason for that directive had to do with the tendency of the OS to automatically add extra characters to replace any (forbidden) spaces in a file name.  A file name like:   “Test File.pdf” would end up looking like this:  “Test20%File.pdf”.  Those extra characters usually ended up making all file names pretty much unreadable and we wanted to avoid that.

You’ll notice in the “Update Media” window (below) that the WordPress program automatically adds dashes anyway to replace spaces to prevent the dreaded “20%” characters that the OS always adds to file names that contain spaces.    That was the original desire in encouraging the use of underscores.  Fortunately the system has solved this problem for us so we may now abandon the use of the underscore… sorry if it caused you extra work… we’re learning.

By the way, you will also notice that the “Title” field (above) is actually the text material that the system uses when reporting file download / upload activity by our users in the side margin “widgets” on every GLAT page.  So that means that leaving out the underscore will also look nicer there too.

While we’re on the subject… it might be a good time to promote the idea of writing shorter, widget-friendly, names in that “Title” field (above).  We would still like to encourage our curators to write long, more descriptive text in the actual file names… yes, spaces allowed.  This allows us to connect each file to a specific Collection and a specific Curator.  That’s going to be critical down the road when looking through what will eventually be a huge collection of files in our Media Library and wondering where each file is being used (what collection page).

This could someday be a real nightmare if our curators are not careful with their documentation.

However, it would help in the usability / easy read department if our curators were to go into that automatically generated “Title” area and shorten it up a bit… perhaps we could shoot for a maximum of two lines so it will better fit in one of our margin widgets (see below)?

As you can see in the next screen capture of our right margin area in the “Recent Files Uploaded…” widget using underscores works against us by messing with the word wrap feature.  In this example long, underscored, names DO wrap correctly, however in some cases they don’t.  So… let’s change that one… no more need to use underscores in the file name when uploading to the Media Library.

I will, post haste, endeavor to modify our tutorials that mention this underscore directive… thanks for bringing it up.

Thanks,
– Webmaster


Geoscience Library of Applied Technology