Please tell me what is wrong with this command

Discussion in 'Windows 7 Help and Support' started by Nisko, Dec 6, 2011.

  1. Nisko

    Nisko Senior Member

    Joined:
    Jun 30, 2010
    Messages:
    210
    Likes Received:
    0
    "C:\Program Files\Contig\contig.exe -a c:\pagefile.sys"
    .....where -a is a switch. This program (Contig) should perform a defrag on the page file.
     
  2. Elmer

    Elmer Extraordinary Member

    Joined:
    Mar 5, 2010
    Messages:
    3,873
    Likes Received:
    284
  3. Trouble

    Trouble Noob Whisperer

    Joined:
    Nov 30, 2009
    Messages:
    13,845
    Likes Received:
    833
    I believe the -a switch is to analyze notto actually defrag.

    -a
    If you want to simply see how fragmented a file or files have become, use the -a switch to have Contig analyze fragmentation.

    SOURCE: Contig
     
  4. Nisko

    Nisko Senior Member

    Joined:
    Jun 30, 2010
    Messages:
    210
    Likes Received:
    0
    That is what I'm trying to do. There is something wrong with the syntax of the command. I get an error message each time I try.
     
  5. Trouble

    Trouble Noob Whisperer

    Joined:
    Nov 30, 2009
    Messages:
    13,845
    Likes Received:
    833
    Can we assume you are seeing this error
    Code:
    C:\Users\johnsmith\Downloads\Contig>contig -a C:\pagefile.sys
    
    Contig v1.6 - Makes files contiguous
    Copyright (C) 1998-2010 Mark Russinovich
    Sysinternals - [URL="http://www.sysinternals.com"]Windows Sysinternals: Documentation, downloads and additional resources[/URL]
    
    [COLOR=#ff0000][U][B]The process cannot access the file because it is being used by another process.[/B][/U][/COLOR]
    
    No files fragmented.
    I assume it means pretty much what is says and won't work against a live online pagefile
    because when I use it to analyze other files it seems to work OK.
    Code:
    C:\Users\johnsmith\Downloads\Contig>contig -a C:\windows\windowsupdate.log
    
    Contig v1.6 - Makes files contiguous
    Copyright (C) 1998-2010 Mark Russinovich
    Sysinternals - www.sysinternals.com
    
    C:\windows\WindowsUpdate.log is in 7 fragments
    
    Summary:
         Number of files processed   : 1
         Average fragmentation       : 7 frags/file
     
  6. Nisko

    Nisko Senior Member

    Joined:
    Jun 30, 2010
    Messages:
    210
    Likes Received:
    0
    No, this is what I'm 'seeing':

    The command in the Target Box is not valid (sic). Sorry, please tell me how to insert a screen capture.

    Also, I didn't know you couldn't defrag a live page file - thanks.
     

Share This Page

Loading...