1

I'm trying to create a catalog to verify a backup created by RoboCopy, containing ~150GB / 100K files, using New-FileCatalog in Windows 10 via:

New-FileCatalog -Path I:\Users\ -CatalogFilePath .\i_users.cat -CatalogVersion 2.0
  • After a few hours of processing, I receive error:
    New-FileCatalog: Unable to find file I:\Users...
    
    PS $ New-FileCatalog -Path i:\Users\ -CatalogFilePath .\i_users.cat -CatalogVersion 2.0
    
      New-FileCatalog : Unable to find file gapi.loaded_0=I:\Users\susan\Documents\Art Illusions Sunset Pier Canvas Print & Reviews _ Temple & Webster_files\cb=gapi.loaded_0 to hash.
        At line:1 char:1
          + New-FileCatalog -Path i:\Users\ -CatalogFilePath .\i_users.cat -Catal ...
            + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            + CategoryInfo          : InvalidOperation: (:) [New-FileCatalog], InvalidOperationException
            + FullyQualifiedErrorId : UnableToFindFileToHash,Microsoft.PowerShell.Commands.NewFileCatalogCommand
    
    
    PS $ $PSVersionTable    
      Name                           Value
      ----                           -----
      PSVersion                      5.1.19041.1023
      PSEdition                      Desktop
      PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
      BuildVersion                   10.0.19041.1023
      CLRVersion                     4.0.30319.42000
      WSManStackVersion              3.0
      PSRemotingProtocolVersion      2.3
      SerializationVersion           1.1.0.1
    
    
    PS $ Dir 'I:\Users\susan\Documents\Art Illusions Sunset Pier Canvas Print & Reviews _ Temple & Webster.html'
      Directory: I:\Users\susan\Documents
    
        Mode      LastWriteTime           Length    Name
        ----      -------------           ------    ----
        -a----    21/03/2021   8:50 PM    861394    Art Illusions Sunset Pier Canvas Print & Reviews _ Temple & Webster.html
    
    
    PS $ New-FileCatalog -Path 'I:\Users\susan\Documents\Art Illusions Sunset Pier Canvas Print & Reviews _ Temple & Webster.html' -CatalogFilePath .\i_test.cat -CatalogVersion 2.0
      Mode      LastWriteTime           Length    Name
      ----      -------------           ------    ----
      -a----    20/06/2021  12:43 PM    701       i_test.cat
    

Hang on if it can't find the file how does it know its name?

  • The complete file path is always displayed correctly (excl. extension) and thought it might be file permissions/ownership issues, but I have no issues accessing/opening the same files from other utilities [Explorer] or from New-FileCatalog with just the problem file
  • I have tried launching PowerShell as Administrator with no difference
  • I'm unsure how to progress the New-FileCatalog to complete the catalog, as there doesn't seem to be an option to skip, continue, and report any files that are a problem

Any suggestions?

10
  • What is the full error? You can replace your name if it contains a space, with something generic that has a space. Why is your user profiles located on another disk other than the system disk? Please edit your question instead of submitting a temporary comment
    – Ramhound
    Jun 19, 2021 at 13:00
  • The user profile is a backup. Backups are normally kept on secondary drives. The error I quoted is the full error. I could give you one of the names of the files but there's nothing special about any of names of the failing files. Yes some of the names have spaces in them. Most of the files have spaces in their names. They are all shorter (much) than 250 characters. And no other utility has an issue with them!
    – WallyZ
    Jun 19, 2021 at 16:20
  • There must be more to “Unable to find file I:\Users....”, I also want the entire PowerShell line, to verify the code is correct. Can you please provide the information required and necessary to answer your question?
    – Ramhound
    Jun 19, 2021 at 16:28
  • There is more printed out but nothing related to the error. The file are just from Documents folder. I'll edit hthe post and add the full command.
    – WallyZ
    Jun 19, 2021 at 16:32
  • I'm running the command again and I'll screen shot the complete error!
    – WallyZ
    Jun 19, 2021 at 16:36

1 Answer 1

0

So in the end I used these powershell commands to do what I needed.

Get-ChildItem -i:\Users -Recurse | Get-FileHash -Algorithm MD5 | Select-Object Hash,Path | Format-Table -AutoSize -Wrap | Out-String -Width 500 | tee -FilePath I_users.txt

(I chose MD5 rather than SHA256 because it's faster)

This had no issue finding and hashing every file.

Rather than use test-catalog to perform the compare I then repeated the above command on the other volume and manually compared the txt files with a visual diff tool! Job done!

So my opinion is the New-FileCatalog command is unreliable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .