In Big-data era, the data are stored in flat files which is supporting wider range of technology and systems. Json is serialized data to feeds…
Leave a CommentHome » Powershell
Category: Powershell
PowerShell script to delete files from list and output list of deleted file
Published December 30, 2014 by Imthiaz Rafiq
Delete files listed in CSV the PowerShell script will read and clean it up from physical location.
PowerShell
1 2 3 4 5 6 7 8 9 |
$Termed_Users = "C:\Data\Termed_Users.csv" $Home_Folders = "X:" $UserList = Import-Csv $Termed_Users $UserList | ForEach-Object { $ID = $_.ID $User_Home = $Home_Folders + "\" + $_.ID Remove-Item -recurse -force $User_Home -erroraction silentlycontinue } |