Path too long

T

Thomas

I have some files (mp3) with very long filenames. I cannot use them (move
them, rename them etc.)
Any idea what to do before deleting them?
 
R

R. C. White

Hi, Thomas.

In olden days, before MP3 was even invented, and even when I bought my first
TRS-80 in 1977, filenames were limited to 8 upper-case alphanumeric
characters. Later, provision was added for an optional extension of up to 3
characters. Ever since, the "8.3 filename" has been the norm. Every file
on your computer meets this 8.3 pattern. If the actual filename doesn't
qualify, then the file system creates a Short File Name (SFN) for use
internally while showing us (and Windows Explorer) the LFN (Long File Name).
Even a 1-character filename can be an LFN if its one character is not
allowed in the 8.3 rules.

To see these 8.3 filenames, open a Command Prompt window (Start | All
Programs | Accessories | Command Prompt). Use the ancient Dir command, from
days before "Directory" was changed to "Folder". Add /? to Dir (Dir /?) to
see the parameters and switches available with Dir.

Then type Dir /x and press Enter to see the usual Directory listing with an
additional column of names before the LFNs. For each filename that does not
meet the 8.3 rules, you will see the SFN in the new column before the LFN.

For example, I copied two files into a test folder; one has an LFN, the
other an SFN. Then I used the Dir command alone, and again with the /x
switch. Here's what I saw:

First:
J:\test>dir

Directory of J:\test

12/15/2008 10:45 PM 1,314 WLMRollback.txt
06/05/2000 03:52 PM 3,120 xcopy.txt

And then:
J:\test>dir /x

Directory of J:\test

12/15/2008 10:45 PM 1,314 WLMROL~1.TXT WLMRollback.txt
06/05/2000 03:52 PM 3,120 xcopy.txt


As you can see, the LFN of WLMRollback.txt was converted to WLMROL~1.TXT,
while the SFN xcopy.txt was left unchanged.

So, how can you use this information? You can use the Dir /x command to see
the SFNs of each of your MP3 files. Then you can manipulate those files any
way you want by using their SFNs. (The system automatically converts
lowercase to uppercase in SFNs.) For example, I could delete
WLMRollback.txt by typing:
Del wlmrol~1.txt

I'm glad the utility Tom suggested worked for you. But you and other
readers might find this information useful, too.

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP
(Running Windows Live Mail 2009 in Win7 Ultimate x64 7000)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top