简体   繁体   中英

Copy files from corrupted HD using a powershell script

I am trying to use a script that ignores I/O errors on a HD, to copy whatever is good there into another HD. I found this script here : http://81.165.15.172:1983/blog/2013/06/02/ignoring-device-io-errors-during-copy-with-powershell/comment-page-1/ ( https://raw.github.com/DavorJ/PS-ForceCopy/master/Force-Copy.ps1 ) that does just that...but i cant get it to work.

I am trying with command :

.\Force-Copy.ps1 -SourceFilePath "I:\Downloads\" -DestinationFilePath "H:\Downloads" -MaxRetries 6

but it gives me this weird error:

F:\SSDU\Desktop\Force-Copy.ps1 : Cannot validate argument on parameter 'SourceFilePath'. The "Test-Path -LiteralPath $_ -Type Leaf" validation script for the argument with value "I:\Downloads\" did not return true. Determine why the validation script failed and then try the command again.
At line:1 char:34
+ .\Force-Copy.ps1 -SourceFilePath "I:\Downloads\" -DestinationFilePath
"H:\Downlo ...
+                                  ~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Force-Copy.ps1], ParameterBind
   ingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Force-Copy.ps1

Anyone knows how to use this in win-8 64-bit ? -Thanks

So, it's not a PowerShell solution, but for getting whatever you can off a dying drive I recommend using Roadkil's Unstoppable Copier. You can download it from the author at:

http://www.roadkil.net/program.php/P29/Unstoppable%20Copier

I have had good success with that one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM