Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
i've created a batch file that copies qvds from production to dev.
the problem is i want the batch to only copy the qvds that were created in the last day, not all the files ever.
this is how the code is written now:
copy "D:\QlikView\Models\PerformanceModel\DB\QvdDaily\*.qvd" "D:\QlikView\Dev\PerformanceModel\DB\QvdDaily"
how do i limit the code to copy only the files created in the last day, or even the last week?
thanks,
Yaron.
Hi Yaron,
Use xcopy instead (which comes with Windows) to copy files depending on their modify/create date.
Use a variable to populate the date in Windows format then use xcopy
LET vDateCopy = Date(Today(), 'MM-DD-YYYY');
EXEC xcopy "D:\QlikView\Models\PerformanceModel\DB\QvdDaily\*.qvd" "D:\QlikView\Dev\PerformanceModel\DB\QvdDaily" /d:'$(vDateCopy)'
Miguel
just some idea
xcopy has an interesting parameter:
/d[:mm-dd-yyyy] : Copies source files changed on or after the specified date only. If you do not include a mm-dd-yyyy value, xcopy copies all Sourcefiles that are newer than existing Destination files. This command-line option allows you to update files that have changed.
you can use QlikView to create and run a bat file
http://community.qlik.com/message/493224#493224