Skip to content

$cs.File\_CopyFile

$cs.File_CopyFile(string source, string destination, bool overwrite = true)

source

source file

destination

destination file

overwrite

 overwrite existing file

Terminal window
$cs.File_CopyFile("C:\Program Files\CapaInstaller\dummy.exe","C:\Windows\dummy2.exe")

returns nothing

This copies the logs to the logs folder making it visible in CapaInstaller Console

Terminal window
$Destination = Join-Path $global:AppLogFolder "dism.log"
$cs.File_CopyFile("C:\Windows\Logs\DISM\dism.log", $Destination)