Question

I found the MSDN article on how to upload files via FTP here:

How to: Upload Files with FTP

However I am not sure that I can achieve my goals by using this method. I want basically specify the block size, locsite and record format as well as uploading but I'm not sure I can do this. Realistically this is the command I would like to be able to perform via C# without having to spawn a CMD prompt and execute it via that:

LOCSITE LRECL=158 BLKSIZE=32706 RECFM=FB         
PUT 'your text file' XX.YY.ZZ.AA.BB(+1)

The (+1) on the end of my file upload location indicates the end needs to be auto generated, I'm not sure if that works either the same.

Could anyone shine some light on how I might be able to process the above command via C#?

Was it helpful?

Solution

See How to send arbitrary FTP commands in C#. You might be better off trying with a third-party FTP implementations.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top