I want to copy list of files specified in text file to list of destination by creating directory. I have one Excel file in which there are 2 columns, source and destination, each source has a destination.
Example Source:
\\10.0.0.1\share\abd.nsf
\\20.0.0.1\share\red.nsf
Example Dest:
\\10.0.0.2\share\abd\
\\10.0.0.2\share\red\
Currently I am using below code, but involves n number of lines so it is tedious.
copy-item "\\10.0.0.1\share\abd.nsf" -destination (New-item "\\10.0.0.2\share\abd\" -Type container -force) -force
copy-item "\\20.0.0.1\share\red.nsf" -destination (New-item "\\10.0.0.2\share\red\" -Type container -force) -force