#test.ftp
$mylist = "1|2|3"
FOREACH $item in $mylist
PRINT $item
END FOREACH
FOREACH skips first entry of self created LIST
2 posts
• Page 1 of 1
FOREACH skips first entry of self created LIST
Given the following script:
following output is generated:
The first item is skipped!
I know that including a leading "|" will do the job ($mylist = "|1|2|3"),
but this is not mentioned in the scripting guide (GETLIST; section "Remarks")
Is this a bug or a feature, means you have to change it in scriptftp or in the documentation?
- Code: Select all
following output is generated:
- Code: Select all
- Running C:\test.ftp
2
3
The first item is skipped!
I know that including a leading "|" will do the job ($mylist = "|1|2|3"),
but this is not mentioned in the scripting guide (GETLIST; section "Remarks")
Is this a bug or a feature, means you have to change it in scriptftp or in the documentation?
- terrabio
- Posts: 3
- Joined: 30 Dec 2009, 08:54
Re: FOREACH skips first entry of self created LIST
Hello terrabio,
Well, it's a bug. I have realized that the separator character "|" must be put before every item. For example:
This will work but according to the documentation (and the common sense) your script should also work.
Thanks for reporting this. It will be fixed in the next release (3.4)
Well, it's a bug. I have realized that the separator character "|" must be put before every item. For example:
- Code: Select all
- $mylist = "|1|2|3"
This will work but according to the documentation (and the common sense) your script should also work.
Thanks for reporting this. It will be fixed in the next release (3.4)
- ScriptFTP support
- Site Admin
- Posts: 624
- Joined: 04 Aug 2008, 15:08
- Location: Burgos, Spain, EU
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest

