Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have some files on my C drive with colons in their names. I'm pretty sure they were created in some Linux distro I used before. I know Linux supports colons in file names, while Windows does not. Linux even allows saving files with colons on Microsoft's NTFS file system. I currently don't have the Linux distro installed. I only have Windows installed. So now that I'm back in Windows, how am I supposed to open this file? Install Linux again? Renaming doesn't work, because I get an error. Is there no way to open these files in Windows without using Linux? They are PNG picture files, so Windows can read them, but it doesn't find them because the file paths are invalid.

If I double click on one of the files, Windows Photo Gallery tries to open it and reports:

There are no pictures or videos selected.

If I try to open it in Microsoft Paint it reports:

C:\file:name.png contains an invalid path.

If I try to rename it in Windows Explorer (e.g. replace colonns with underscores) it reports:

The file name you specified is no valid or too long.

Specify a different file name.

Following characters are forbidden in file names in Windows.

A file name cannot contain any of the following characters.
\/:*?<>|

Surely, Linux developers must be aware of these restrictions? I don't see why they would allow Linux to save colons in file names on NTFS partitions... doesn't make sense. Even if Linux itself can read them, chances are that these partitions are read in a Windows system as well (in case of dual boot or shared disks).

These files were named and saved automatically, so it's not my fault the colons were introduced in the names.

share|improve this question
    
Did you try renaming from DOS/Command Prompt and substiting the ? for the colon? –  cybernard Feb 10 at 1:02

2 Answers 2

There is also the option of booting with a Linux live cd (as opposed to installing as dual boot) and renaming the files. That's probably the quickes/easiest imo.

share|improve this answer

You can enable File Name Character Translation to work around this issue.
You will have to modify your registry for file name character mapping to replace characters that are not legal. And since you will be modifying the registry, the standard warning applies.
Windows tutorial here

share|improve this answer
    
And what if I don't have the HKEY_LOCAL_MACHINE\Software\Microsoft\Server For NFS key? Can I just create it and hope it will still work? Does Windows Vista natively support Microsoft SUA subsystem? Or will I have to download some SDK for this to work? Will this work at all on a client Windows system? Or is this Windows Server only? –  sammyg Feb 10 at 21:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.