If you reload using a batch file or the command line, you could always pass the name of the file using the /V switch to set the value of a named variable previously declared in the document, for example:
there are really many ways to do it, and you must be aware of exception cases to control, for example if you have to reload data or skip a weekend.
The way i suggest is:
1 - Create the QVW document and define a variable to hold the reference date (Document Properties - Variables - New button) and define the start date. It's very important not to define the variable directly in script.
In my case i had created a variable called vLastLoad with the date of the last successful load (or the day before the first load)
2 - create the load script like this:
//vNextLoad stores the next date to load
LET vNextLoad = DayName(vLastLoad,1) ;
//vDateLoad is used to format the date according the date mask used in the input filename
LET vDateLoad = date(vNextLoad,'YYYYMMDD');
LOAD * FROM
(txt, codepage is 1252, embedded labels, delimiter is '\t', no quotes);
//here I input an IF to save a new reference day only if the load succeeded
IF ScriptErrorCount = 0 THEN
LET vLastLoad = vDateLoad ;
You can use the different date functions QlikView offers to set the periodicity of the datafile.
If must reset the reference date, you only have to do it in the Document Preferences Window and save the QVW before you restart loading.
I would suggest that you actually have the batch file be written to a specific directory, say Input. The script can then read all the files in the directory and then archive the file in to an archive directory. This all can be done via the executing a command line in the script. ie