Topic "cannot see copied files in winscp interface after refreshing"

Author Message



I am new to this winscp thing.

I am using winscp dll for .net and a portable winscp.exe file to transfer files from local directory to remote server.

I get a success result but I can see the files only for a few mins in the winscp interface. I dont see them if I refresh it couple of times.

I think we have to see the files all the time not just for a few mins. Correct me if I am wrong.

Can someone help me with this...

Below is my code.

Thanks in advance.

SessionOptions sessionOptions = new SessionOptions
Protocol = Protocol.Sftp,
HostName = ConfigurationManager.AppSettings["HOSTNAME"].ToString(),
UserName = ConfigurationManager.AppSettings["USERNAME"].ToString(),
Password = ConfigurationManager.AppSettings["PASSWORD"].ToString(),
PortNumber = Convert.ToInt32(ConfigurationManager.AppSettings["PORT_NUMBER"]),
SshHostKey = ConfigurationManager.AppSettings["SSH_HOSTKEY"].ToString(),

using (Session session = new Session())
// Connect

// Upload files
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
transferOptions.PreserveTimestamp = false;

TransferOperationResult transferResult;
transferResult = session.PutFiles(ConfigurationManager.AppSettings["SOURCE_DIRECTORY"].ToString(),
false, transferOptions);

// Throw on any error

// Print results
//foreach (TransferEventArgs transfer in transferResult.Transfers)
// Console.WriteLine("Upload of {0} succeeded", transfer.FileName);
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
Duplicate post:

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License