Here's the type of method I was talking about. It can be improved upon, checking the FTP_RESULT variable for example, to see if the upload was ok or not.
In the original script you posted, you had a line that said:
If>IfFileExists>*.txt,Start
Whatever you were trying to do here, it's not going to work like this. The expressions in the "If" command can't contain other commands... but you could set a value from a previous operation, and check it that way.
Let>sFolder=E:\test_out\
Let>sMask=*.txt
IfDirExists>%sFolder%,DirectoryOK
MessageModal>The path "%sFolder%% is not valid.%CRLF%Script terminated.
Goto>TheEnd
Label>DirectoryOK
IfFileExists>%sFolder%%sMask%,FilesExist
MessageModal>Pattern not found: %sFolder%%sMask%
Goto>TheEnd
Label>FilesExist
GetFileList>%sFolder%%sMask%,sFiles
Separate>%sFiles%,;,file_names
MessageModal>Matching file count: %file_names_count%
Let>k=0
Repeat>k
Let>k=k+1
Let>sFileName=file_names_%k%
FTPPutFile>192.000.000.000,root,tincan,21,%sFolder%%sFileName%,/u/work/pitbowes/%sFileName%,A
Until>k,%file_names_count%
Label>TheEnd