1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

coding question

Discussion in 'Support' started by Charles G, Feb 15, 2013.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,024
    Likes Received:
    0
    set sFile=d:\whereever\name.ext
    dir /b /s "ftp://ftp.whereveer.com" >! %sFile
    do line in (@[%sTmpFile%])
    ....
    enddo

    The "do line in...." does not actually process the lines "..." inside the DO .. ENDDO
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    That looks funny. I don't understand the []s and the ()s. It would seem that should be
    Code:
    do line in @%sFile
    ...
    enddo
    Code:
    v:\> type dotest.btm
    set file=v:\testfile.txt
    do i=1 to 10 ( echo %i >> %file )
    do line in @%file
            echo %line
    enddo
     
    v:\> dotest.btm
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
    v:\>
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,863
    Likes Received:
    83
    Where are you defining "%sTmpFile"?
     
  4. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,190
    Likes Received:
    11
    Alternatively, you could combine some of those steps:
    Code:
    do line in /p dir /b /s "ftp://ftp.wherever.com"
    ...
    enddo
    
     

Share This Page