PDA

View Full Version : Undeletable files under NTFS partition


Shoonay
21 June 2007, 12:46
When it comes to KG's WHDLoadPowerPack I usually unpack all the games to my PC's NTFS partition with 7zip, and than copy the contents to my Amy's HD using WinUAE, and *finally* arrange them according to game names, on me real Amy.
So I did this time, got back to me PC and started to delete the - not needed anymore - files from the PC's NTFS partition.

But this time, it gave me an error.

Not knowing what's going on I've started to delete folders seperately - by hand, to get to the file that's causing the error.
After a while (KG's packs are *HUGE* ;)) I found that the problem is with these:

http://img406.imageshack.us/img406/8127/whdloadgameonntfsfilesyqe7.th.png (http://img406.imageshack.us/my.php?image=whdloadgameonntfsfilesyqe7.png)

In OsWALDOfTheIceFloes\Data there are two 85 byte files - with *no* name, thus undeletable...

So, how can I delete the files?
Does it have something to do with "Vista's long goodbye" problem? :rolleyes
... or maybe 7zip *beta* has badly unpacked the contents? :blased

:confused

Toni? :help :bowdown

Toni Wilen
21 June 2007, 13:03
WinUAE does not allow space-only names (it gets converted to _uae__xx) and it is impossible to create no-name files.

My guess is that name has at least one character but it has some weird character code that explorer don't understand. (internally NTFS allows most "illegal" characters)

Try deleting it in command prompt. (for example del *.*)

ADDED: or in worst case, try deleting inside emulation :)

Shoonay
21 June 2007, 13:21
Thankyou, Sir! That worked! :bowdown

IIRC the files weren't even present there - in the folder, under emulation and deleting the folder "above", made an arror message... but I can't remember it :/

Shoonay
21 June 2007, 14:09
Damn, another undeletable things found on me PC's HD (it's the annual hd cleaning process ;))
This time, I cannot delete or enter a folder - even in command prompt.

It's in ...\Moduly\moduly\modules.p\
The folder's name is p.o.w.

http://img406.imageshack.us/img406/498/ntfsfilesystemproblemtn2.th.png (http://img406.imageshack.us/my.php?image=ntfsfilesystemproblemtn2.png)

...and probably because of this dot on the end it causes these trouble :/

I've tried renaming this folder or naming/creating a different folder that way, and even overwriting that one, but nothing works :/

s2325
21 June 2007, 14:16
try deltree *.* command, but you will not find it in Win XP
http://www.highfiber.com/~raster/deltree.zip

Galaxy
21 June 2007, 14:24
You could also try mounting the drive from linux and deleting the offending files/folders - there have been a few occasions when this is the only way I've managed to delete a file. Maybe you can use Cygwin to do this too?

Toni Wilen
21 June 2007, 14:26
This time, I cannot delete or enter a folder - even in command prompt.


Tried "rm -r *" ? (note: it deletes all files and directories in current directory)

EDIT: Oops, I forgot rm comes with cygwin :)

Shoonay
21 June 2007, 14:39
I'm on Vista x64, and there's no deltree.exe and this deltree.com is incompatible... :crying

Can I run cygwin on me sys without the need to be a pro programmist? ;)

Jason
21 June 2007, 15:04
You could use Cygwin, but that's a bit overkill just for rm.
Grab Unix Utilities instead from http://unxutils.sourceforge.net/

Edit:
I'll just add that 'rm' is the *nix way of deleting files. It's similar to 'del' on the PC and 'delete' on the Amiga.

rm * deletes the files in the current directory
rm -r * deletes the files and folders in the current directory. The -r stands for recurse meaning go inside all subdirectories and delete their contents too.

Hope that helps

Shoonay
21 June 2007, 15:42
I'm still doing something wrong...

I copied sh.exe to c:win and got to that directory using win's command prompt. Typed sh.exe with enter, and finally the command mentioned above - it gives me a unknown command error :/

Jason
21 June 2007, 15:51
Why are you typing sh? ;)
Get the UnxUtils.zip archive and unpack the rm.exe file somewhere. Run that from the Windows command line. Done :)

It's in usr\local\wbin in the archive.

eLowar
21 June 2007, 15:57
I have a native Windows rm thanks to MSYS, but I'd like to ask all of you, what's the advantage of rm -r over del /s?

Edit: Okay, so Belgarath pointed out to me that del /s only deletes the files in all the subdirs, not the dirs themselves. So I checked rmdir /s (or rd /s, same thing) to remove the subdirectories and it turns out that deletes files too. :p

Shoonay
21 June 2007, 16:15
Why are you typing sh? ;)Oh, sorry, I thought that the sh.exe has all commands compiled in one package. Also, I thought that deeper into the directories I'll find only sourcecodes...

So I've copied rm.exe to windows, but now it gives me that "there is no such directory" & "the directory is not empty" message :/

Jason
21 June 2007, 16:24
That just means 'rm' isn't doing what we would've hoped, so it's back to square one ;)

eLowar
21 June 2007, 16:26
That just means 'rm' isn't doing what we would've hoped, so it's back to square one ;)

All ignore me, why don't you? See if I care.

Shoonay
21 June 2007, 16:29
I've tried what you've described in that previous post eLowar, really I did, but it still can't find what it's suppose to delete :/

eLowar
21 June 2007, 16:32
I've tried what you've described in that previous post eLowar, really I did, but it still can't find what it's suppose to delete :/

What happens with rd /s on the parent dir then? Does it give a similar error about not finding files?

Shoonay
21 June 2007, 16:36
The syntax of the command is incorrect. :/

Belgarath
21 June 2007, 16:40
Try http://www.purgeie.com/delinv/

It costs money, but only to use certain advance features, it should work well enough to do what you need.

eLowar
21 June 2007, 16:43
The syntax of the command is incorrect. :/

You did type rd /d <dirname>, right? Not just rd /d, cause that obviously won't work (and will say something like syntax error).

That said, the tool Belgarath googled up probably does the trick, so there you go.

Shoonay
21 June 2007, 16:44
Yes! Yes! Yes! Thankyou! Thankyou! Belgarath! :bowdown
That did the trick with no extra error messages!!! :cool

@eLowar: Uhmm... yeah I've *not* typed that :/ Silly me, damn...
Thankyou too

eLowar
21 June 2007, 16:55
Ah well, at least the mystery of the missing deltree is solved.

Shoonay
21 June 2007, 16:58
Just one more thought there, eLowar
You mean it's quite certain that the rd command would worked too if I'd type in the missing dir?
Just want to encode this to me brain for the future ;)

eLowar
21 June 2007, 17:06
No, I don't know that, and now we'll never know. :p

It may or may not have worked, my point was just that getting cygwin stuff isn't necessary just to replicate the functionality of deltree. Quite obviously there's a reason deltree doesn't exist anymore, which is that rd /s does the same thing.

I don't know what functions the Cygwin/MSYS tools use, but the Windows API functions are generally more flexible under Windows than the C standard library functions in the GNU compiler, so chances are del/rd might've worked when rm doesn't. But as I said, too late to find out now. :)

Shoonay
21 June 2007, 17:12
Shit, sorry for such an opportunity lost... ;)

Don't worry, I'll just download the newest KG's pack (when it's out) and probably came up with something similar ;)

Thanks again, and may this thread live and prosper as the *Ultimate Book of Knowledge (and a bit of my stupidity) in deleting files and folders on NTFS partitions! :D

OddbOd
21 June 2007, 17:32
Edit: Ooops, not needed anymore.

Shoonay
21 June 2007, 17:34
It's all been solved now, OddbOd, thanks for trying to help!

eLowar
21 June 2007, 17:52
Edit: Ooops, not needed anymore.

To be honest I thought your original post may be valuable advice here to somebody who may find the thread in the future.

So here it is again. ;)

Does Vista not support short names?

Try doing dir /x then use the short name on the left i.e. rd <shortname> /s

Failing that try deleting by UNC path rd \\?\E:\Downloads\Torrents\Complete\Moduly\moduly\modules.p\p.o.w.

OddbOd
21 June 2007, 18:16
Fair enough, I edited it after seeing the program Belgararth linked above, it seems to do exactly what I suggested in a more user friendly way.