• Welcome! The TrekBBS is the number one place to chat about Star Trek with like-minded fans.
    If you are not already a member then please register an account and join in the discussion!

0 bytes file help

Gaius Baltar

Commander
Red Shirt
Hi

I saved out some files to my documents however when I checked them later on I noticed that when I right clicked on them the normal rename, copy, delete options were missing and I am no longer able to open or modify the files.

The file size is showing as about 15mb in the details that appear in the left panel of windows explorer however when I get the properties of the file using the file->properties menu it is showing as zero bytes. Also the type, icon and creation dates are empty.

I have tried using command line and listing the files directory contents and file size is correct. Though it might have been due to an invalid character so tried using dos rename command to rename the file however the dos window crashes with an error when I try this.

Has anyone come across any similar problems or know of a way around this to retrieve the file. Am running XP with SP3. Thanks.
 
What type of file are they?

The one time I saw this type of behavior was when I saved a file from a captured video shot, and after exiting the app (PowerDVD) the saved file was black and had no size.

In your case it sounds (at the least) like the files got corrupted somehow.

Have you tried highlighting the file and using crtl+c & crtl+v to copy & paste it? Probably won't work if the right-click menu isn't allowing it.
 
It may be an invalid character as you suspect, (I have an idea what these files are from ;))

Are you able to delete them, or does that return an error also?

If it is an invalid character, then the NTFS file system is partly to blame, not least for allowing the file to be written in the first place. But I'm not sure that a FAT32 formatted drive would handle them any better, should you copy these files to a usb stick for example. (I'm wondering if the USB stick would allow them to be renamed and copied back to your hard disk.)

If you can't delete them or their parent folder then you've got a bit of a problem, because you're kind of stuck with them, so don't risk screwing up your usb stick aswell.


In this situation I think I'd bring out my handy Knoppix Live CD again. Boot into linux, mount the hard drive, write enable the drive, and rename the files to something valid from there.

Hope that works for you. :)
 
These files wouldn't happen to be from P2P networks would they? The missing context menu options sound pretty suspicious. I don't think simply having a corrupted file would cause that kind of behaviour.
 
These files wouldn't happen to be from P2P networks would they? The missing context menu options sound pretty suspicious. I don't think simply having a corrupted file would cause that kind of behaviour.

The context menu for files is based solely upon the file extension, like .mpg or .flv. If that isn't legible (maybe because of an invalid character), then there will be no context menu.

The effects of invalid characters stems from how the file allocation table stores metadata.

The data is formatted as a struct, containing several properties like the file's index, the index of it's parent folder, the sector/block on the disk where the file begins, the 8.3 filename, and the 255 character (extended) filename, date and time, file size, and various flags such as read only, system, hidden, etc.

When the struct is read, an invalid character can act like a terminator, that renders everything subsequent in the struct null. Compare it to a rogue full stop in a sentence, and you. stop reading where you hit it, causing you to miss all the data after it.

So if an invalid character appears in the extended file name, it can cause the file system to not see the file extension, not read the filesize, not read the date and time, nor the flags, thus rendering these null.
 
I know the context menu is based on the file type, but all files at least have delete/rename/cut/copy/paste in Windows Explorer regardless of type if I recall, and it would just throw up an error if you tried to use them on a messed up file. I've never had any really corrupted files though so maybe I'm wrong.
 
Yes it turned out that I had saved the file with an invalid character although I would have expected XP to have caught this when I tried to initially save the file. Was able to use a third party tool called DelinFile to rename the file from windows using its short name and it now opens again correctly. Thanks for the help.:)
 
If you are not already a member then please register an account and join in the discussion!

Sign up / Register


Back
Top