[Solved] Deleting files base on time creation [closed]

[ad_1] As it is clear in the example from where you have taken the code that fileList is a array of FileInfo. you have to declare and fill that array before code.: DirectoryInfo Dir = new DirectoryInfo(DirectoryPath); FileInfo[] FileList = Dir.GetFiles(“*.*”, SearchOption.AllDirectories); [ad_2] solved Deleting files base on time creation [closed]

[Solved] Delete specific subfolder under unknown folders from anywhere

[ad_1] I created a short powershell solution using this- $targetName=”ss s”; foreach ($file in Get-Childitem “G:\Project\Projects\” ) { $fname=$file.name; if (Test-Path “G:\Project\Projects\$fname\$targetName\”) { $shell = new-object -comobject “Shell.Application” $item = $shell.Namespace(0).ParseName(“G:\Project\Projects\$fname\$targetName”) $item.InvokeVerb(“delete”) } } This powershell script sends that folder to recycle bin after confirmation popup. (this won’t send any file named ‘ss s’) this … Read more

[Solved] Search files and delete them via SSH [closed]

[ad_1] From http://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/ find . -name “error.log” -exec rm -rf {} \; And also XARGS example from http://www.askdavetaylor.com/how_do_i_delete_all_occurances_of_a_file_in_linux.html find . -name “error.log” | xargs rm 0 [ad_2] solved Search files and delete them via SSH [closed]