After hours backup ending in morning
Good weekend everyone,
I'm trying to automate large backups during my off-peak bandwidth.
What I've managed so far is from reading the WinSCP documents.
Currently I'm using the following batch with windows scheduler.
Then later I run
However this batch isn't using parallel connections and following a search on WinSCP it appears as though its too complicated of a task to achieve through batch, this is when I found the following.
https://winscp.net/eng/docs/library_example_parallel_transfers#upload_csharp
My question is being that C# is a more in depth language would there be a way to add some line that if possible start and end at set time and leave running in background or at minimum end at set time so I can still see the following.
$ "Uploaded {0} files, totaling {1:N0} bytes"
Thanks for all support my only coding experience is HTML, thankfully C# looks like a clean enough language that I know at least the lines I need to change in the example.
I'm trying to automate large backups during my off-peak bandwidth.
What I've managed so far is from reading the WinSCP documents.
Currently I'm using the following batch with windows scheduler.
set TMPPATH=@@@@@@ "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^ /command ^ "open sftp://$$$$$$:######@%%%%%%/ -hostkey=""******=""" ^ "put ""d:/dump/*"" ""%TMPPATH%""" ^ for /r "%TMPPATH%" %%f in ("*.*") do move "%%f" "@@@@@@" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%
Then later I run
taskkill /f /im "WinSCP.exe"
However this batch isn't using parallel connections and following a search on WinSCP it appears as though its too complicated of a task to achieve through batch, this is when I found the following.
https://winscp.net/eng/docs/library_example_parallel_transfers#upload_csharp
My question is being that C# is a more in depth language would there be a way to add some line that if possible start and end at set time and leave running in background or at minimum end at set time so I can still see the following.
$ "Uploaded {0} files, totaling {1:N0} bytes"
Thanks for all support my only coding experience is HTML, thankfully C# looks like a clean enough language that I know at least the lines I need to change in the example.