Skip to content

$cs.File\_DelFile

$cs.File_DelFile(string filepath, bool recursive = false)

Checks if a file exists and deletes it. If recursive = $true, it checks the folder and subfolders for the filename and deletes the files if they exist.

filepath

file to delete and starting path

recursive

delete file from subfolders, relative to filepath (default False)

Terminal window
$cs.File_DelFile("C:\Program Files\CapaInstaller\dummy.exe",$True)

returns nothing