SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Simple zip error: "hiberfil.sys being used by another process"

Last post 07-13-2009 7:07 AM by DavidPierson. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-24-2009 9:06 PM

    Simple zip error: "hiberfil.sys being used by another process"

    All I need to do is zip up an Excel file. The code I am using is this:

            Dim myZipper As New FastZip
            myZipper.CreateZip(txtFilePath.Text, "C:\", True, "")

    It seems like simple enough code, I took it from the wiki under resources (thanks for that by the way). The full error message is this:

    "The process cannot access the file 'C:\hiberfil.sys' because it is being used by another process."

    I have no idea why it would need to access a system file that is associated with hibernation. I am working on a lap top FYI, using XP, VS2008 and programming in VB.Net obviously. I've read a couple of pages after googling this error message which suggest deleting the file and trying again but it is in use apparantly but I dont know what by. And even if this did fix my issue, would it happen again another time or on other machines once I publish the application?


    If anyone could point me in the right direction, I'd appreciate it.

  • 06-29-2009 9:54 PM In reply to

    Re: Simple zip error: "hiberfil.sys being used by another process"

    hiberfil.sys is created by the suspend-to-disk (hibernate) mode.

     

    to remove it, disable hibernate mode, and it should automatically get deleted (or do it manually after a reboot).

    to recreate it, enable hibernate mode again

  • 07-13-2009 7:01 AM In reply to

    Re: Simple zip error: "hiberfil.sys being used by another process"

    Windows if disallowing your application opening the hibernation storage file. Quite reasonably, I would have thought.

    Realisitically, are you sure you want to try to add the entire contents of a C: drive into a zip file? The windows folder is huge and contains very little worth backing up. I think you just need to change the 2nd parameter from "C:\" to someting sensible, and it will work. Also avoid the situation where you try to add the zip file into itself.

    Hope this helps
    David

  • 07-13-2009 7:07 AM In reply to

    Re: Simple zip error: "hiberfil.sys being used by another process"

    On re-reading your comment, I think the parameters are not correct. To add one file, try this:

    myZipper.CreateZip(txtOutputZipFileName.Text, txtFolderContainingExcelfile, False, txtNameOfExcelFile)

    e.g.

    myZipper.CreateZip("C:\temp\myzip.zip", "c:\foldercontainingtheExcel",  False, "MyExcelFile.xls")

    If the entire path and filename is being input by the user, there are handy static methods in the Path class the split that into the folder and filename components.

     

Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.