Topic "Synchronize files from remote sftp directory to local"

Author Message
brettrsmithjr
[View user's profile]

Joined: 2012-02-24
Posts: 4
I am trying to synchronize the remote directory with a directory that is on my desktop locally. The thing is, I do not know what the name of the files on the remote directory will be so how do you retrieve all the file names in the remote directory before I synchronize the remote directory files with the local directory files?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Use Session.ListDirectory:
http://winscp.net/eng/docs/library_session_listdirectory

But possibly you could use Session.SynchronizeDirectories directly
http://winscp.net/eng/docs/library_session_synchronizedirectories
_________________
Martin Prikryl
brettrsmithjr
[View user's profile]

Joined: 2012-02-24
Posts: 4
Is there a way to look at the file properties and choose a file based on it's edit or created date?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Use RemoteFileInfo.LastWriteTime:
http://winscp.net/eng/docs/library_remotefileinfo

I would really appreciate if you take a look at documentation yourself. I believe this information is easy to find.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License