Help with "FTP - Download Only New Files"

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
blinkinkin
Posts: 1
Joined: 04 Oct 2012 20:59

Help with "FTP - Download Only New Files"

#1 Post by blinkinkin » 04 Oct 2012 21:05

I used this script successful but there some line in script I don't understand, somebody can explain for me?
http://www.dostips.com/DtTipsFtpBatchSc ... lyNewFiles

Code: Select all

Call:extractFileSection "[Ftp Script 1]" "-">"%temp%\%~n0.ftp"
Rem Notepad "%temp%\%~n0.ftp"


Code: Select all

For /F "Delims=" %%A In ('"Ftp -v -i -s:"%temp%\%~n0.ftp"|Findstr %FindStrArgs%"') Do (
    Call Set "FileList=%%FileList%% "%%A""
)


and these lines what for?

Code: Select all

SETLOCAL Disabledelayedexpansion
set "bmk=%~1"
set "emk=%~2"
set "src=%~3"
set "bExtr="
set "bSubs="
if "%src%"=="" set src=%~f0&        rem if no source file then assume THIS file
for /f "tokens=1,* delims=]" %%A in ('find /n /v "" "%src%"') do (
    if /i "%%B"=="%emk%" set "bExtr="&set "bSubs="
    if defined bExtr if defined bSubs (call echo.%%B) ELSE (echo.%%B)
    if /i "%%B"=="%bmk%"   set "bExtr=Y"
    if /i "%%B"=="%bmk%:S" set "bExtr=Y"&set "bSubs=Y"
)


Thank u very much!

Post Reply