Let vNumberOfDays = 7;
For vI = 1 to $(vNumberOfDays)
LET vFileDate=date(today()-vI, 'MMDDYYYY');
==> Want to check existence here
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)
STORE Log_$(vFileDate) INTO $(vQVD)/Log_$(vFileDate).qvd;
DROP TABLE Log_$(vFileDate);
I would recommend to use something else than the load scripts own FTP transfer. You can use built in Windows features like ftp.exe - the command line ftp client that is part of Windows. You can use Powershell which is part of Windows too and via the .NET Framework you can do FTP easily. There are very good open source solutions too like WinScp, Wget and CURL which are free and well documented. With all these you can script your FTP reliably and get remote directory listings too.
But if you are in a hurry and needs only a one-off solution you could stick to QlikView Load Script FTP - but I abandoned it myself for lack of flexibility, reliability and more.