Rani
Rani

Reputation: 111

File.Copy Throwing throw "The filename, directory name, or volume label syntax is incorrect" error

i am trying to copy a file from staging folder to inbound folder . not sure what i m doing wrong

 File.Copy("//o1-app-03/na_dev$/STAGE/RMS.TXT", "//o1-app-03/na_dev$/INBOUND/RMS/");

Upvotes: 0

Views: 95

Answers (1)

Guru Stron
Guru Stron

Reputation: 141835

Add desired destination file name to the second argument cause File.Copy has two parameters, both of them are file names:

public static void Copy (string sourceFileName, string destFileName);

Upvotes: 1

Related Questions