Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 08, 2016, 12:04:19 PM
  • Proudly celebrating 10 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 2511 times)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,473
    • View Profile
    • Donate to Member
corrupted file after power disruption
« on: November 26, 2008, 06:26:31 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: 7,986
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: corrupted file after power disruption
« Reply #1 on: November 26, 2008, 07:32:59 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,473
    • View Profile
    • Donate to Member
Re: corrupted file after power disruption
« Reply #2 on: November 26, 2008, 07:57:03 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: 7,986
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: corrupted file after power disruption
« Reply #3 on: November 26, 2008, 08:11:24 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,029
  • [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:33 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