Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4106
Number of posts: 14016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
URGENT CORRUPT Posted by TMPilot on 17 Apr 2008 at 11:23 AM
My .PAS is corrupt. Is there a way to repair or recover it?

Thanks.
Report
Re: URGENT CORRUPT Posted by zibadian on 17 Apr 2008 at 12:09 PM
: My .PAS is corrupt. Is there a way to repair or recover it?
:
: Thanks.
:
.pas files are simple text files. You can open it in the notepad and extract the uncorrupted code in there.
Report
Re: URGENT CORRUPT Posted by TMPilot on 17 Apr 2008 at 12:13 PM
: : My .PAS is corrupt. Is there a way to repair or recover it?
: :
: : Thanks.
: :
: .pas files are simple text files. You can open it in the notepad and
: extract the uncorrupted code in there.

Thanks, but notepad also says it's corrupt. I can't copy it or even delete it.
It still has the correct no. of bytes in the filesize.
Report
Re: URGENT CORRUPT Posted by Actor on 17 Apr 2008 at 12:18 PM
: : : My .PAS is corrupt. Is there a way to repair or recover it?
: : :
: : : Thanks.
: : :
: : .pas files are simple text files. You can open it in the notepad and
: : extract the uncorrupted code in there.
:
: Thanks, but notepad also says it's corrupt. I can't copy it or even
: delete it.
: It still has the correct no. of bytes in the filesize.
:
Try opening it with the "edit" program from the command prompt.

If that does not work try "type whatever.pas" from the command prompt and see what you get. Of course "whatever.pas" is whatever the name of your file is.

Actor

Report
Re: URGENT CORRUPT Posted by TMPilot on 17 Apr 2008 at 12:26 PM
: : : : My .PAS is corrupt. Is there a way to repair or recover it?
: : : :
: : : : Thanks.
: : : :
: : : .pas files are simple text files. You can open it in the notepad and
: : : extract the uncorrupted code in there.
: :
: : Thanks, but notepad also says it's corrupt. I can't copy it or even
: : delete it.
: : It still has the correct no. of bytes in the filesize.
: :
: Try opening it with the "edit" program from the command prompt.
:
: If that does not work try "type whatever.pas" from the command
: prompt and see what you get. Of course "whatever.pas" is whatever
: the name of your file is.
:
: Actor
:
:
edit gave me the same corrupt message.
Using type, what would I replace the spaces in the address with? E.g. H:\Computing\A Level\
Report
Re: URGENT CORRUPT Posted by zibadian on 17 Apr 2008 at 12:52 PM
: : : : : My .PAS is corrupt. Is there a way to repair or recover it?
: : : : :
: : : : : Thanks.
: : : : :
: : : : .pas files are simple text files. You can open it in the notepad and
: : : : extract the uncorrupted code in there.
: : :
: : : Thanks, but notepad also says it's corrupt. I can't copy it or even
: : : delete it.
: : : It still has the correct no. of bytes in the filesize.
: : :
: : Try opening it with the "edit" program from the command prompt.
: :
: : If that does not work try "type whatever.pas" from the command
: : prompt and see what you get. Of course "whatever.pas" is whatever
: : the name of your file is.
: :
: : Actor
: :
: :
: edit gave me the same corrupt message.
: Using type, what would I replace the spaces in the address with?
: E.g. H:\Computing\A Level\
:
Put the filename in quotes. This allows the DOS box to see the path as a single command-line parameter.
Report
Re: URGENT CORRUPT Posted by TMPilot on 17 Apr 2008 at 12:56 PM
: : : : : : My .PAS is corrupt. Is there a way to repair or recover it?
: : : : : :
: : : : : : Thanks.
: : : : : :
: : : : : .pas files are simple text files. You can open it in the notepad and
: : : : : extract the uncorrupted code in there.
: : : :
: : : : Thanks, but notepad also says it's corrupt. I can't copy it or even
: : : : delete it.
: : : : It still has the correct no. of bytes in the filesize.
: : : :
: : : Try opening it with the "edit" program from the command prompt.
: : :
: : : If that does not work try "type whatever.pas" from the command
: : : prompt and see what you get. Of course "whatever.pas" is whatever
: : : the name of your file is.
: : :
: : : Actor
: : :
: : :
: : edit gave me the same corrupt message.
: : Using type, what would I replace the spaces in the address with?
: : E.g. H:\Computing\A Level\
: :
: Put the filename in quotes. This allows the DOS box to see the path
: as a single command-line parameter.

It also says the file is corrupted and unreadable. :(
Report
Re: URGENT CORRUPT Posted by MT2002 on 17 Apr 2008 at 7:10 PM
: It also says the file is corrupted and unreadable. :(

(disclaimer: I dont know Pascal. I might be able to help out as it is
more of a generic windows problem.)

Two possibilities that I can think of:

1)

Try copying the file from your h drive to your local machine. If you get an error from Windows when copying, see (2). If not, try to open the file in notepad, and let us know what happens. If you still get an error, go on to number (2).

2)

Notepad, as a plain text editor, can open up the file in different character sets and formats (binary and text).

You can also try opening up the file using DOS EDIT command (Its a text based graphical DOS text editor that comes with windows). To run it, just type "edit" in the run box (Windows key+r; or run it via command line. It supports both keyboard and mouse input)

If it still fails to open, odds are the file structure is corrupt (All text files in Windows must end in a EOF byte (0xff). Text editors use it to determine the end of text files. If the file structure is corrupt, then..well...

I do hope you backed up your source files...


[.:EvolutionEngine][.:MicroOS Operating System][Website :: OS Development Series]
Report
Re: URGENT CORRUPT Posted by Phat Nat on 18 Apr 2008 at 11:25 AM
If you are still unable to open it, you could try running scandisk. It will most probably find a problem with the file and work it's magic, which may mean removing the file, but if so it will backup the data into a hidden directory called "FOUND.000" "FOUND.001" etc (assuming you are running XP)

Then you will have to manually look through the directory to find the correct file (or part of if it's that corrupt)

Also if you use TP I know that it makes a "FILENAME.BAK" file everytime you save over the original. See if it's there and just take it ;)

Phat Nat



 

Recent Jobs