Reputation: 159
I am trying to copy a file from a network drive then move to the different folder. Somehow is not moving the file to the directory I specified. After executing the read file code, the file is copy in the same directory.(see pic)
I have try the same code from my local drive and it works fine.
'copy the file
File.Copy(Path.Combine("\\swnas.swmed.org\Phytel\", Dts.Variables("File").Value.ToString), Path.Combine("\\swnas.swmed.org\Phytel\Raw\MCKPP\Processed", insertNewName), True)
'read the file
objStreamReader = New StreamReader(Path.Combine("\\swnas.swmed.org\Phytel\Raw\MCKPP\Processed", insertNewName))
'overwrite the file
objWriter = New StreamWriter(Dts.Variables("File").Value.ToString, False)
Upvotes: 0
Views: 46
Reputation: 26
I'd take a minute and make sure there are no odd permission rules being applied to the directory you are copying/moving to.
Upvotes: 1