I have issue with backup folders from server to ftp (NAS). I was using Cobian backup, but after security updates Cobian started don't handle some files what earlier wasn't problem (doc,pdf or some type setup file). I tried change to .bat files script with scheduler help. I was using script
net use X: \\address\Backup /user:logins /p:no
for /f "tokens=1* delims=" %%a in ('date /T') do set datestr=%%a
md X:\*\*_"%date:/=_%"
md X:\*\*_"%date:/=_%"
md X:\*\*_"%date:/=_%"
md X:\*\*_"%date:/=_%"
md X:\*\*_"%date:/=_%"
net stop MSSQL$PAYPREMIUM
net stop ASANYs_labbis
net stop ASANYs_FinvaldaMaxiServer
net stop ASANYs_FinvaldaMaxiServern
robocopy C:\Program Files\Microsoft SQL Server\MSSQL10_50.PAYPREMIUM\MSSQL\DATA X:\1\PAYPREMIUM\DATA /MIR /LOG:D:\LOG\log.txt
robocopy /mir C:\*\ X:\*\*_"%date:/=_%" /COPY:DAT /E /LOG:D:\LOG\log.txt
robocopy /mir C:\Program Files\Microsoft SQL Server\MSSQL10_50.PAYPREMIUM\MSSQL\DATA\ X:\*\*_"%date:/=_%" /COPY:DAT /E /LOG:D:\LOG\log.txt
robocopy /mir C:\ProgramData\*\data\ X:\*\data_"%date:/=_%" /COPY:DAT /E /LOG:D:\LOG\log.txt
robocopy /mir G:\*_K\ X:\*\*_K_"%date:/=_%" /COPY:DAT /E /LOG:D:\LOG\log.txt
robocopy /mir G:\*\ X:\*\*_"%date:/=_%" /COPY:DAT /E /LOG:D:\LOG\log.txt
net start MSSQL$PAYPREMIUM
net start ASANYs_labbis
net start ASANYs_FinvaldaMaxiServer
net start ASANYs_FinvaldaMaxiServern
net use X: * /delete /Y
But robocopy and xcopy did not handled some situations. So after this I try use WinSCP script
option batch abort
option confirm off
open ftp://logins
put -preservetime E:\FILESERVER /disk1/ftp/SRV/FileServer_%TIMESTAMP#yyyymmddhhnnss%
exit
But even this did not handle the situation when from catalog tree with files from 60+GB only copy one folder without files that make trouble. Trouble that when you copy simple you get notifications about path long and another about that cant copy permissions pdf, doc, ppt files. So I need to make that pass this problems and copy as much that not have problem with path long and path long files that make error just skip.