[strange bug] File not found

English support forum

Moderators: Hacker, petermad, Stefan2, white

bobby
Junior Member
Junior Member
Posts: 16
Joined: 2005-05-08, 07:10 UTC

[strange bug] File not found

Post by *bobby »

I've got a strange error, or should I say, strange file.
The file isn't viewable in Explorer, and I can't delete it in TC.
Take look at the shoot:
Image: http://members.chello.at/bobby100/del_error.gif
Deleting the whole folder also don't works.

Any suggestion?
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2bobby
Hi,

It don't know what to do - but here is an explanation:

the problem is the period at the end of the filename:
msdn wrote:Do not end a file or directory name with a trailing space or a period. Although the underlying file system may support such names, the operating system does not.
(Source: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp )

Windows provides file creation operations which may create filenames with a trailing period but other windows operating systems don't support such names.
bobby
Junior Member
Junior Member
Posts: 16
Joined: 2005-05-08, 07:10 UTC

Post by *bobby »

Hi,
I'm aware of the case, and why the file isn't deleted, or displayed in Explorer, but I can't get why and how the file is created.
I have try to make such file, in order to confirm the theory that Im guilty for existence of such file on my HDD, but I didn't succed to rename any other file in such maner.
I'v made a text file, and tryed to remove the extension from TC and Explrorer - the trailing dot was deleted automaticaly.
I'v tryed to add a dot to the file name, to add more dots etc. - nothing, all the files was posible to delete. Except of the one on screenshot.

Anyone with an idea how to delete it?

Edit: I'm a programer, but this file isn't a product of any of my (badly writen) programs. Probably is a product of Mozilla download.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

bobby wrote: Anyone with an idea how to delete it?

Edit: I'm a programer, but this file isn't a product of any of my (badly writen) programs. Probably is a product of Mozilla download.
It's quite simple, I think. Create a button with "cm_SwitchLongNames" and let TC display the old 8.3 name of the file. Then you should be able to delete the file. At least does this work for me fine in any case (even to switch into unicode-named subfolder etc.)

Maybe this file has been created by unpacking a unix-archive? That way you can create those forbidden filenames.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Here is a small program capable of creating such files :lol:

www.lefteous.de/tc/archives/eviltouch/eviltouch.zip

Pass the filename as command line parameter.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Hi Lefteous,

this program does make nothing on my PC. Neither on the commandline nor called via button.
If I would not know (you) better I'd suspect it to be a kind of Malware ;) .

But to let everyone know. I'm sure it is not.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Sheepdog
Have you tried to pass a filename as parameter as mentioned above?

Of course it is malware if you know how to use it properly :D
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Yep, like

Code: Select all

EvilTouch.exe "ABD."
. Do you need .Net or anyxthing installed?

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Sheepdog
No prerequirements but a full pathname should do the job:
EvilTouch.exe C:\Nonsense\Hansi.

Source code:

Code: Select all

#include <windows.h>
#include <strsafe.h>

int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t* lpCmdLine,int)
{
	const int MAX_NTFS_PATH = 0x7FFF;
	wchar_t fileName[MAX_NTFS_PATH] = {0};
	StringCchCopyW (fileName, MAX_NTFS_PATH, L"\\\\\?\\");
	StringCchCatW (fileName, MAX_NTFS_PATH, lpCmdLine);
	HANDLE hFile = CreateFileW (fileName, FILE_ALL_ACCESS, FILE_SHARE_WRITE, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
	CloseHandle (hFile);
    return 0;
}
User avatar
Flint
Power Member
Power Member
Posts: 3511
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

bobby
It is known problem - and there is a way to solve it. Just run from command line the following command (I used the path that is on your TC screenshot):
del \\.\C:\Downloads\*
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
bobby
Junior Member
Junior Member
Posts: 16
Joined: 2005-05-08, 07:10 UTC

Post by *bobby »

@Flint
That didn't help :(
File is stil there.

@sheepdog
that did the trick :)
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

2Lefteous
Okay it works.
It does not accept quotation marks ( wich I tried for a filename with trailing space). But since I don't need a tool to create filenames that couldn be manipulated anymore it is not neccesary to adopt your tool. ;)



But now I have tested that you can manipulate the file with TC in 'short names mode'.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Flint
Power Member
Power Member
Posts: 3511
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

bobby
That's strange... Can you post here the output text when you executed this command?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
bobby
Junior Member
Junior Member
Posts: 16
Joined: 2005-05-08, 07:10 UTC

Post by *bobby »

There was a question like "Are you sure Y/N?"
I'v typed Y.
Other file in folder was deleted, but the problematic one wasn't.
There was no error messages, I've got the prompt after typing Y.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

The correct command line to delete these files is like that:
del \\?\X:\path\to\funnyfilename. (or more dots, * will delete all(!) files in that directory, so beware...).

It's better to create a button and drag and drop the files one by one to not nuke half of your file system by mistake. ;)

Code: Select all

command: %comspec% /c
parameter: del \\?\%P%N
Icfu
This account is for sale
Post Reply