set dir1=C:\TEST\ScanTo\
set strTime=_%Date%_%Time%
set strTime=%strTime::=-%
set strTime=%strTime:,=-%
set strTime=%strTime:/=-%
%SYSTEMDRIVE%
cd\
cd "Program Files"
cd CmdTwain
CmdTwain.exe /PAPER=A4 /RGB /DPI=300 /JPG75 "%dir1%\Scan_%strTime%.jpg"
::"%dir1%\Scan_%strTime%.jpg"
exit