Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review



How to take the backup of folder of remote computer??

Re: backup local directory to ftp Server with adding actual "date-Time" to remote directory-Name

Many thanks for help – I tested script – but remote folder was not resolved with "time-date-stamp" – remote folder appears as follows:

What can I do? – thank for help in advance ...

Re: The opposite way

The solution is the same:
get /remote/path/* C:\local\path\data\%TIMESTAMP#yyyy-mm-dd%

Except that WinSCP cannot create the target local directory for you. You have to create it before starting WinSCP.
E.g. from a wrapper batch file or PowerShell script.

You can still use WinSCP to generate the directory name for you:

rem Create new local directory
set TIMESTAMP_FORMAT=yyyy-mm-dd
for /F "tokens=* USEBACKQ" %%F in (` /command "echo %%TIMESTAMP#%TIMESTAMP_FORMAT%%%" "exit"`) do set TIMESTAMP=%%F
mkdir C:\local\path\data\%TIMESTAMP%
rem Run WinSCP to download files to the newly created directory ...

The opposite way

I need the same thing but only in the opposite direction. So, I need to schedule my PC to connect to remote FTP, collect all the files & folders there and copy those to my HDD at certain interval. The most important thing is that every time it collect the data, it create new containing folder with date&time stamp in folder name on a local drive so I could have multiple backups without overwriting the old ones.

Thanks in advance

Backup local directory to FTP server with adding actual "date-time" to remote directory name

Hello everybody,
I have to do automated daily backup of local "data"-directory of a cash register system to a FTP server at a specific time (06:00 a.m).
Nn the FTP server, there should be added actual "date-time" to remote directory name. e.g. data >>> 2016-11-15_0139_data
Can you provide me with a sample script, where similar problems have been solved before or give me some hints – many thanks in advance.