Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

URGENT CORRUPT

TMPilotTMPilot Posts: 4Member
My .PAS is corrupt. Is there a way to repair or recover it?

Thanks.

Comments

  • zibadianzibadian Posts: 6,349Member
    : 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.
  • TMPilotTMPilot Posts: 4Member
    : : 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.
  • ActorActor Posts: 438Member
    : : : 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

  • TMPilotTMPilot Posts: 4Member
    : : : : 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:ComputingA Level
  • zibadianzibadian Posts: 6,349Member
    : : : : : 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:ComputingA Level
    :
    Put the filename in quotes. This allows the DOS box to see the path as a single command-line parameter.
  • TMPilotTMPilot Posts: 4Member
    : : : : : : 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:ComputingA 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. :(
  • MT2002MT2002 Posts: 1,444Member
    : 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...

    [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=http://www.brokenthorn.com]Website :: OS Development Series[rightbr][/link][/size]
  • Phat NatPhat Nat Posts: 757Member
    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
Sign In or Register to comment.