what to do when XP scan disk converted folder to file?

  • Thread starter Thread starter serge_moscou
  • Start date Start date
S

serge_moscou

hello

there is a scandisk programme which checks FS on windowsxp startup.
This program may have found a fs error or sth else and... converted folder
to a file.

There were 120G of valuable data .
What can I do now?

and if nobody knows where could write for the solution?

Thank you
 
I suppose for your valuable data you had no backup?

I suggest you run the hd manufacturers checking utility to asertain the
integrity of your hd
 
there is a scandisk programme which checks FS on windowsxp startup.

I wish it were a Scandisk, but it's only AutoCk that "fixes"
automatically, with no Undo.
This program may have found a fs error or sth else and... converted folder
to a file.
There were 120G of valuable data .
What can I do now?
and if nobody knows where could write for the solution?

I've seen this when a HD > 137G was used with a version of XP older
than SP1; a bunch of directories became "files", thanks to some
dumb-assed "fixing" logic.

I went in with Norton DiskEdit from a DOS mode boot, found the
relevant directory entries, and flipped the Directory attribute bit
back on. Got everything back.

That's relatively easy if FATxx; if NTFS, all bets are off. If you
can find the equivalent file system data, the same fix may work.

I know this info is a bit "geeky" for end users to apply directly, so:
- don't do ANYTHING with the system
- especially, DO NOT BOOT WINDOWS
- find a tech with an interest and skills in file system repair
- show him/her this message


--------------- ----- ---- --- -- - - -
Hello DOS mode my old friend
I've come to hack with you again
 
Hello

Exactly !! BUT "HOW TO flip the Directory attribute bit back"
Would you be so kind as to precise what is this "bit" how to put it back.

Thanks emmensly

Serge



"cquirke (MVP Windows shell/user)" <[email protected]>
???????/???????? ? ???????? ?????????:
 
On Sun, 25 Mar 2007 21:29:17 +0400, "serge_moscou"
Exactly !! BUT "HOW TO flip the Directory attribute bit back"
Would you be so kind as to precise what is this "bit" how to put it back.

To be honest, it's not easy unless you know what you are doing and are
very careful, but I'll give you the background.

Traditional directory entries have a very simple, fixed-size set of
information that define and describe the file, directory or volume
label entry that they point to. There's an 11-character field for the
8.3 fiole name, a cluster address field to point to the start of the
file, fields for the date and time, and so on.

One of these fields holds a set of loose bits that flag something
about the file, label, directory or (after Win95) Long File Name.

These bit flags are called "attributes", and they include:
- read-only
- hidden
- system
- volume label
- directory
- archived

You can use the Attrib command to set and clear some, but not all, of
these, e.g. Attrib +r Test.txt would set Test.txt to be read-only, and
Attrib -s -h -r C:\Boot.ini would expose that file for editing.

The trouble is, there aren't any commands to set the Volume or
Directory attribute for an entry, because these are managed by the
machine and arbitrary changes to them can cause disasterous data loss.

So to flip the Directory bit, you have to go beneath the OS, and edit
the raw disk directly. There's absolutely no safety net there, it's
entirely up to you not to (say) overwrite the starting cluster address
or do other damage that can make things considerably worse.

You also need tools to do this stuff, and they don't come with the OS.
I use DiskEdit from DOS mode, but DiskEdit is feeware, being part of
Norton Utilities (I'm using the one from NU95).

I can't recall the offsets offhand, in case you want to do this from a
raw disk editor that doesn't at least show you directory entries as
such (as Diskedit does, for FATxx) but I can find that via Wikipedia
or similar, easily enough...

http://en.wikipedia.org/wiki/File_Allocation_Table#Directories

Scroll down, and you'll see this; offset 0x0B is attribute bitfield...

1 File Attributes
The first byte can have the following special values:

Bit Mask Description
0 0x01 Read Only
1 0x02 Hidden
2 0x04 System
3 0x08 Volume Label
4 0x10 Subdirectory
5 0x20 Archive
6 0x40 Device (internal use only, never found on disk)
7 0x80 Unused

An attribute value of 0x0F is used to designate a long file name
entry.

....so you'd want to flip bit 4 (of 0..7) i.e. er... 1, 2, 4, 8, 16 ...
add 16 (10 in hex) to value if that has that bit cleared, in order to
change that directory entry from "file" to "directory".

The difficulty is going to be finding those entries that you want to
fix. If the 8.3 name is unique, then you could search raw disk for
it, but you must be careful you are really in a dir and not something
else. It's obvious in DiskEdit if the offsets don't make sense;
harder if looking at raw hex.

A tech with general skills may pull this off if he or she has the
material (this thread, that Wikipedia reference) and the tools and the
temprament, even if they aren't file system boffins.

To do the same thing in NTFS, may be tricky - I don't know whether the
directory entry "shape" is the same, and rather suspect it isn't.

If there are easier tools to do this, I'd love to know about them -
but I'd not trust this job to an automated "fixer-upper" like ChkDsk.


--------------- ---- --- -- - - - -
Saws are too hard to use.
Be easier to use!
 
Ok,
Thank you VERY MUCH for the detailed answer!
I see MUCH clearer now.
I remember vaguely having delt with Disk Edit many many years ago
/but I have completely forgotten why/
Any way I just have no time to get down to it but as soon as I have I'll
write you my experience/and question/
with your kind permission:-)))

Thank again

Good day to you




"cquirke (MVP Windows shell/user)" <[email protected]>
???????/???????? ? ???????? ?????????:
 
Back
Top