#get filenames from txtfile
foreach ($file in Get-Content -Path "C:\Filelist.txt")
{
#Remove : and replace with Underscores
$name = ( $file) -replace '\\', '_' -replace ':'
#Create new folder at destination location with new filename
New-Item -Path "\\destinationpc\$name" -ItemType Directory -ErrorAction SilentlyContinue
###Next step How would one create a csv with 2 columns, the original name and new name?
}
下一步我遇到了困难,如何创建一个包含 2 列、原始名称和新名称的 csv?