Is it possible to pull data from the db and make it part of the queryout filename. It would be Date time stamp and trailer#.csv
set SAVESTAMP=%DATE:/=-%@%TIME::=-%.csvset SAVESTAMP=%SAVESTAMP: =%
bcp "SELECT holmandb.dbo.tlcentry.tl_ID, holmandb.dbo.tlcentry.recordno, holmandb.dbo.tlcentry.tl_recvr, holmandb.dbo.tlcentry.tl_trailer_no, holmandb.dbo.tlcentry.tl_sku_no, holmandb.dbo.tlcentry.tl_julian_date, holmandb.dbo.tlcentry.tl_ac_no, holmandb.dbo.tlcentry.tl_time, holmandb.dbo.tlcentry.tl_qty_no, holmandb.dbo.tlcentry.tl_partialflag from holmandb.dbo.tlcentry " queryout "s:\Material Handling\Holman\Load Reports\tlreport_%SAVESTAMP%" -Slocalhost\HOLMAN -T -c -t, -r\r