move data from one folder to another

Hello All, I would like to move particular data from one folder to another folder for that im using this power shell command

Importing Active Directory CSV

$profile = Import-Csv -Path ‘C:\Users\amahankali\desktop\ACTIVE_DIRECTORY.csv’
$Folder = Get-ChildItem -Path ‘C:\Users\amahankali\Test Folders’ | select -Property Name
$Former_Employee = $profile | where-object {$_.title -eq “Former_Employee”} | export-csv “C:\Users\amahankali\Desktop\former.csv” -NoTypeInformation
Compare-Object $compformer.netid $ -IncludeEqual | export-csv “C:\Users\amahankali\Desktop\Commformer.csv” -NoTypeInformation
$list = “c:\users\amahankali\desktop\commformer.csv”
$remove = Import-csv $list | Where-Object {$_.”sideindicator” -eq “==”} | Export-Csv “c:\users\amahankali\desktop\FinalFormer.csv” -NoTypeInformation
$var1 = ‘C:\users\amahankali\Test folders’ $var2 = ‘C:\users\amahankali\desktop\archive folder’ $file = get-childitem -path ‘c: amahankali\desktop\finalformer’ foreach($file in var1) { call $file if ($file inputobject -eq $var1{ move-item -path $var2 } }

can anyone help me how to move data of formaer employee which is in test folder to archive folder by using powershell

Hi Amala,

Did you google/Bing anything before you putting down some code?

There are plenty of articles on this over the internet.

For this scenario you should use robocopy. Please refer to the link below…

Please do let us know, if you see anything odd.

Thank you.