_______________________________________________________________________________________________

Removing the Folder having ASCII Character From the Drive

By Harshal.A.Chaudhari

_______________________________________________________________________________________________

Most of the time ppl save there data & restrict access to there folder by simply adding some ASCII character in the name of folder.So that no one can either view there document nor modify or delete them.So then the question arises in mind how to view or delete such folders.Now without wasting anytime let's get started.

* There are 2 way's in which we can solve the problem ( as far as i can think )

1. U can go to Dos prompt and Note the ASCII character at the end of the folder name by simply typing a "dir /ad" command without " " and that will show u the ASCII character.

(e.g) as follows

Suppose the folder name is harsh on c Drive
---------------------------------------------------------------------------------------------
C:\>dir /ad

Volume in drive C is HARSHAL
Volume Serial Number is 3D40-0AEA
Directory of C:\

RECYCLED  DIR 08-02-02 9:41a RECYCLED 
NCDTREE   DIR 02-15-00 4:13a NCDTREE 
INDOWS    DIR 02-15-01 3:41a INDOWS 
PROGRA~1  DIR 02-15-01 3:47a Program Files 
SBPCI     DIR 02-14-00 4:29a SBPCI 
HARSH-    DIR 09-09-02 12:08p harsh-       <- Here it is!!
MYDOCU~1  DIR 07-03-02 12:23p My Documents 
WINDOWS   DIR 07-03-02 9:21p WINDOWS 
_RESTORE  DIR 05-04-02 1:58p _Restore 
--------------------------------------------------------------------------------------------- 

Note the ASCII character - at the end of directory named harsh.All u have to do is scroll through the ASCII Character table searching for the ASCII character in the table,which in our case is - and look for the corresponding numerical value. So as i scroll through the ASCII table i got the numerical value 196( this is in decimal ) for the ASCII character - in ur case......... that's all Hey u have done it!! man. Now all u have to do is just type "ren harsh- harsh" on DOS prompt without " " and the folder is renamed to harsh .Now u can view or delete the folder as u wish ;-)

Or

As u saw it may be a boring job to scroll through the ASCII character table searching for that end character so here is a nice idea .....In this method u can try to rename the folder by appending each ASCII character at the end of folder name ...make a simple c program use the system ( ) function & try to rename the folder which is locked by going in a loop.The folder won't be renamed untill the last ASCII character will match & as soon as it match's it will rename the folder & come out of the loop u can also save that ASCII character so that u can know which character it was.

* Second method *

2. This is a Bit Advanced Stuff . To understand this u must know how data is actually store on Hard Disk & detail's of

a) Master Boot Record (MBR)
b) Boot record
c) Root directory

I assume that u know the above things. Now as we all know that each folder has it entry in Root Directory.I thought of editing the Root Directory & eliminating the ASCII character at the end of the name of folder.I know what u will be thinking why to do such a tedious job if we can follow the first method......But my friends some times we are not allowed to access the Dos prompt by Sys-Administrator.Still u can do ur job by executing the c program which i told u, But u should know the core hence i am presenting this method. Ok let start we will take the same above example say harsh is folder on C Drive which is locked. For this u must reach the Root Directory ( that Sector ) the way would be as follows

In Master Boot Record ( look in the Partition Table Entries for starting sector )
     |
  Starting Sector ( Boot Sector )
     |
   Root Directory ( nothing but some Sector's,location can be calculated from Boot Sector )

*The display of Root Directory is as follows
________________________________________________________________________________________

  NAME    Ext    Id   Size     Date    Time    Cluster Attribites
 
ROOT            Vol      0    2-14-00 5:27 am        0 A - - - - V 
RECYCLED      	Dir  	 0    8-02-02 9:41 am    2,566 - - S H D -
NCDTREE    	Dir  	 0    2-15-00 4:13 am  122,503 - - - - D -
BOOTLOG   PRV   File  26272   7-03-02 9:44 pm      385 A - - H - -
SUHDLOG   --- 	File  9145    2-15-01 3:50 am   16,510 - - - - - -
DETLOG    TXT  	File  73506   7-04-02 11:28 pm 182,813 A - S H - -
MSDOS     ---  	File     22   2-15-01 3:40 am   22,803 - - - H - - 
SETUPLOG  TXT   File  106656  7-03-02 9:33 pm   19,970 A - - H - -
SETUPLOG  OLD   File  128338  7-03-02 1:00 pm   34,748 - - - H - - 
INDOWS 		Dir       0   2-15-01 3:41 am   14,369 A - - - D -
SUHDLOG   DAT 	File   9145   7-03-02 9:26 pm  218,824 - R - H - -
SCANDISK  LOG   File  13781   9-05-02 6:15 pm  231,611 A - - - - - 
BOOTLOG   TXT   File    627   7-28-02 11:57 am   3,944 A - - H - - 
HARSH-          Dir       0   9-09-02 12:08 pm  33,299 - - - - D - 
.................. ... .... .... ....... ..... ...... ...........

___________________________________________________________________________________________

Now see the entry for our folder harsh is also there along with that ASCII character - All u have to do is read the sector
( Root Directory ) in buffer modify (remove ascii character ) the location at which the ASCII character is located & then
write to the sector again. I suggest that u should write a Program for that,infact i am writing one it's in finishing stage i will post
it here as soon as i complete it , because i had taken a simple example here,if the folder was in some other folder then the
story is bit different ;-). Anyway's I might add that afterwords.

Bye 4 now.Hope it was useful & u like it.

___________________________________________________________________________________________

CREDITS

1). I Thank Astalavista.com for giving me an opportunity to write this Tutorial.
2). It goes to Rajesh.chaudhari , my Mom & Dad , Sagar.S , Nilesh.C ,Anirudha.B ,Mayur.S & all friends whom i forgot to mention here ,coz What i am today is because of them.
___________________________________________________________________________________________

U can Contact & Share ur view with me at gj007_in@yahoo.com if i could be of any help ____________________________________________________________________________________________