topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 16, 2024, 4:22 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: corrupted file after power disruption  (Read 5973 times)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,823
    • View Profile
    • Donate to Member
corrupted file after power disruption
« on: November 26, 2008, 06:26 AM »
hello

I was using a software (mirc) and this software reads a txt file (script.ini) to perform some actions, it does NOT write on this file anything

but when the power of the laptop stopped, and I had to reboot, this file was corrupted (it contained NULL characters when opened with notepad)

1. is there a way to restore it?

2. why this happened? I mean, since there was no write activity at this file at all, why just reading the file got the file corrupted? is it winxp or hard disk's fault?

3. how can I prevent such failures in the future?

thanks

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: corrupted file after power disruption
« Reply #1 on: November 26, 2008, 07:32 AM »
Can't answer 1 or 2.

For 3 - why did the power fail?

If the battery has run out there is not much you can do except plugin the computer.

If it is a power failure to your power supply either make sure you have a charged battery installed or get a UPS so that even without mains power you have sufficient time to shut down your system (or use software to automatically shutdown cleanly on power failure).

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,823
    • View Profile
    • Donate to Member
Re: corrupted file after power disruption
« Reply #2 on: November 26, 2008, 07:57 AM »
it's a laptop and it run out of battery

is there a program that can ensure that some crucial files (eg some ini's) are safe from such disaster?

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: corrupted file after power disruption
« Reply #3 on: November 26, 2008, 08:11 AM »
I haven't looked in Vista but in XP if you go to Control Panel > Power Options there is an alarm tab which lets you set a battery level where an alarm is given and an action can be set.

You could set this so that at 10% battery life left it warns you and at 5% battery life it automatically hibernates.

That way if you are at the computer you can grab a power lead if it is to hand and if you have left it unattended it can look after itself!

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: corrupted file after power disruption
« Reply #4 on: November 26, 2008, 11:22 AM »
If you're using NTFS as filesystem, this shouldn't happen - unless mIRC is doing something stupid... which it might very well be doing :)
- carpe noctem