Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.2k views
in .NET FTP by (120 points)
Hi all,

I had problem when uploading files from my local computer to the remote computer. Upon executing UploadFile, it give me an error "Illegal characters in path". I had check that this file exist in my local C drive. Please help. My code is as follow :

ftpConnection1.Connect();
ftpConnection1.TransferType = EnterpriseDT.Net.Ftp.FTPTransferType.ASCII;

ftpConnection1.UploadFile("C:\testing.txt", "test.txt");
ftpConnection1.Close();

Thanks

1 Answer

0 votes
by (51.6k points)
Try
ftpConnection1.UploadFile(@"C:\testing.txt", "test.txt");

or
ftpConnection1.UploadFile("C:\\testing.txt", "test.txt");


- Hans (EDT)

Categories

...