0

I am using WINSCP functionality with an SSIS script task to move files from a remotePath to a localPath. I am also setting these files to readonly using:

File.SetAttributes(LocalPath, FileAttributes.ReadOnly);

This works to set the attributes, it is just that since I have pulled some data from the remotePath that is already on the localPath, the readonly attribute gets set back to 0 and the archive attribute gets set to 1.

Is there an easy way that I can just pull the files from the remotePath that aren't already in the localPath?

This would eliminate any overwriting of files and also fix my readonly / archive attributes situation

Prob1em
  • 74
  • 6
  • Possible duplicate of [How to remove a single Attribute (e.g. ReadOnly) from a File?](http://stackoverflow.com/questions/7399611/how-to-remove-a-single-attribute-e-g-readonly-from-a-file) – MethodMan Feb 29 '16 at 15:57
  • Nope, I read that thread a couple of days ago. What I am looking for is mainly to grab the files from the remotePath that are not already in the localPath. The attribute situation would just be a bonus. - @MethodMan – Prob1em Feb 29 '16 at 18:13

0 Answers0