1

this one is odd:

I have two partitions on my computer, one for linux (ubuntu 12.latest) and one for window 7. I use grub to choose the system to boot. I made a Screenshot in Linux and saved it on the windows partition, which is mounted in linux with nautilus.

the filename is, or was, i cannot tell if it still exists in reality:

Screenshot from 2012-08-19 11:01:53.png

and it is (or was) saved in the windows Desktop folder (c:\Users\<name>\Desktop).

The file never worked because windows told me its demaged, but that does not matter just because I want to delete it now, but I cannot.

I tried the dir /X - trick, but no short name is generated for this file, I tried the \\?\c:... - syntax trick, but it tells me:

The filename, directory name, or volume label syntax is incorrect.

and I finally tried to delete it within linux, where for the first try the files could not be deleted and didn't exist anymore at the second try.

I tried a chkdsk and it told me: disk is clean.

BTW.: I saved another file from linux on the desktop, this time with a valid name and it appears in linux, but not in windows.

What is going on here?

Greetings....

EDIT::

I tried FAR but:

error deleting file with FAR

every kind of file action (i.e. renaming, move and so on) leads to an error.

1
  • Is the file visible from linux now or not?
    – terdon
    Sep 18, 2012 at 10:48

2 Answers 2

2

In most cases Far Manager can delete files, wich can not delete Windows Explorer, cmd.exe or other file managers. But I can't check it with your example - can't create file with such name ;)

Some symbols (':' too) are forbidden for names in NTFS. So, you have a problems.

Thought, if you need to delete invalid file from Windows directly, you may edit HDD partition with some special tools (WinHex for example) - find file name and change ':' to any other symbol ('_').

Another try - in some cases, deleting via short file name may works (if this file has short file name). You may see the short name in the "dir /X" output, or after pressing Ctrl+N in Far Manager.

3
  • how can i find a file in winhex and change the name there? can i also use the hex plugin within notepad++??
    – philipp
    Sep 18, 2012 at 8:04
  • I was doing this trick lpng ago, not sure, how to find a file name... Try to search for a string. And you may use any editor, which can operate with partitions as raw.
    – Maximus
    Sep 18, 2012 at 8:48
  • So, Far is not a solution for ":" contained names. Because it operates with file system via OS API.
    – Maximus
    Sep 18, 2012 at 8:50
0

I suspect you'll have to delete that file the same way it was created: from the Linux system. The problem is that : is used to access Alternate Data Streams, but the part after the colon is not an alternate stream in this case. I reproduced your scenario and can confirm your observations. The file doesn't have an 8.3 name, and removing it via \\.\C:\... does not work. Same goes for trying to remove the containing folder or using Microsoft's Services for UNIX. You could try Cygwin, but I suspect that won't be much different from SFU.

Bottom line: your best bet is to boot into Linux and delete the file from there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .