Here is a fancy one I wrote. :) #VI #BATCH
Rem This assumes the the VI is set you import the d:\Output\Output.csv file
Rem it waits 60 seconds then move the file to a holding folder with a timestamp of the import.
REM you can add a move command if necessary to setup the output.csv file
REM SET LABEL
REM new file copy with date and time yymmdd_hhmmss
REM where yymmdd_hhmmss is a date_time stamp like 030902_134200
set hh=%time:~0,2%
REM Since there is no leading zero for times before 10 am, have to put in
REM a zero when this is run before 10 am.
if ""%time:~0,1%""=="" "" set hh=0%hh:~1,1%
set yymmdd_hhmmss=%date:~12,2%%date:~4,2%%date:~7,2%_%hh%%time:~3,2%%time:~6,2%
set FileName=output-%yymmdd_hhmmss%
REM YOu need to then change on to the mas90\home folder
d:
cd \sage\erpserver\mas90\home
PVXWIN32.EXE ..\LAUNCHER\SOTAPGM.INI ..\SOA\STARTUP.M4P -ARG DIRECT UION SQL SQL GSC VIWI1J AUTO
rem ""Wait for Order to finish importing""
@ping 127.0.0.1 -n 60 > nul
Rem ""Done with import""
move d:\Output\Output.csv d:\sage\imported\%filename%.csv
REM this bat command can be added to the window schedule to run as often necessary