[Solved] File conditions: hidden files?

Comments

3 comments

  • Colby Bouma

    I did some digging and it looks like the File Condition supports hidden files, but not system files. I will open an internal ticket about this, but I doubt this will be changed anytime soon. In the meantime, here's a PowerShell script you can use as a workaround:

    $Hiberfil = Get-ChildItem -Path "$env:SystemDrive\" -Force | Where-Object Name -eq "hiberfil.sys"
    
    if ( $Hiberfil ) {
    
        "Found: $($Hiberfil.FullName)"
        "Size : $($Hiberfil.Length)"
        Exit 10
    
    } else {
    
        "Could not find hiberfil.sys"
    
    }
    
    0
    Comment actions Permalink
  • Michael Yorke

    If File Conditions don't (and won't in future versions) support system files, it would be nice to see that as the reason in the log files - perhaps a feature for a future version?

    Thanks for the Powershell script. That's great. I have just tested that with success, but replaced Exit 10 with powercfg -h off to actually turn off hibernation. We have some machines with a lot of RAM but small SSD's out there, so removing a 6GB hibernation file from the C drive on machines that don't need the feature is a real help.

    0
    Comment actions Permalink
  • maki

    I am using for years only Command step: powercfg.exe -h off and never failed.

    0
    Comment actions Permalink

Please sign in to leave a comment.