user48870: When trying to read the file names from an sd card some are being returned with a ~1 and cutting off the full file name.
Initializing SD card...initialization done.
TEST.TXT        402
UNTITL~1        0
HELLOT~1        49
DATALOG.TXT     562288
ALONGN~1        0
done!

Is there any way I get the full file name of each file?
The code for this is from here: https://www.arduino.cc/en/Tutorial/Listfiles

user4143: You have long filenames on your SD card. The SD library is too primitive to know what they are.
I'd suggest switching to FatFS (here is one implementation) which has the option of using long filenames.

user8583: That's the way the FAT filesystem works.
On the page you link to there's a link to a page on SDCardNotes. 

FAT file systems have a limitation when it comes to naming conventions. You must use the 8.3 format, so that file names look like “NAME001.EXT”, where “NAME001” is an 8 character or fewer string, and “EXT” is a 3 character extension. People commonly use the extensions .TXT and .LOG. It is possible to have a shorter file name (for example, mydata.txt, or time.log), but you cannot use longer file names.

When you wrote the files to the file system you were on an OS that supports longer filenames. When filenames are too long there's an 8.3 name created automatically with chunks of characters removed and replaced with ~.

48870: <p>When trying to read the file names from an sd card some are being returned with a ~1 and cutting off the full file name.</p>

<pre><code>Initializing SD card...initialization done.
TEST.TXT        402
UNTITL~1        0
HELLOT~1        49
DATALOG.TXT     562288
ALONGN~1        0
done!
</code></pre>

<p>Is there any way I get the full file name of each file?</p>

<p>The code for this is from here: <a href="https://www.arduino.cc/en/Tutorial/Listfiles" rel="nofollow noreferrer">https://www.arduino.cc/en/Tutorial/Listfiles</a></p>
 4143: <p>You have long filenames on your SD card. The SD library is too primitive to know what they are.</p>

<p>I'd suggest switching to FatFS (<a href="https://github.com/gallegojm/Arduino-FatFs" rel="nofollow noreferrer">here is one implementation</a>) which has the option of using long filenames.</p>
 8583: <p>That's the way the <a href="https://en.wikipedia.org/wiki/8.3_filename" rel="nofollow noreferrer">FAT filesystem</a> works.</p>

<p>On the page you link to there's a link to a <a href="https://www.arduino.cc/en/Reference/SDCardNotes" rel="nofollow noreferrer">page on SDCardNotes.</a> </p>

<blockquote>
  <p>FAT file systems have a limitation when it comes to naming conventions. You must use the 8.3 format, so that file names look like “NAME001.EXT”, where “NAME001” is an 8 character or fewer string, and “EXT” is a 3 character extension. People commonly use the extensions .TXT and .LOG. It is possible to have a shorter file name (for example, mydata.txt, or time.log), but you cannot use longer file names.</p>
</blockquote>

<p>When you wrote the files to the file system you were on an OS that supports longer filenames. When filenames are too long there's an 8.3 name created automatically with chunks of characters removed and replaced with <code>~</code>.</p>
