I was working on script which was suppose to pull information from existing .CSV file, another problem is you dont know when new file get generate and you have to fetch data from it. hence what i did is wrote a code which pulls the information from latest file which got created recently under that particular folder. $file = get-childitem "Path" | select -last 1 Instead of path put the share name or unc path without "". Write-host "File Selected - $($file.fullname)" This will give actually information about which file you are targeting to pull information. Script.:- $file = get-childitem "Path" | select -last 1 $ServerInfo = import-csv $file.fullname $ServerInfo |? OU -eq 'General' | Export-Csv C:\TEMP\\Eapps_$currentdate.csv Write-host "File Selected - $($file.fullname)"