Batch script find files in a directory -


i need find find extension *.job in specific folder. somehow code not work. works when change *.job specific name such inv.job?

if exist "c:\watchfolder\incoming\*.job" (  copy /y /v "c:\watchfolder\incoming\*.job" "c:\watchfolder\inprogress"  echo trigger automations ) 

thank reading

try this:

dir "c:\watchfolder\incoming\*.job" >nul 2>&1 && (  copy /y /v "c:\watchfolder\incoming\*.job" "c:\watchfolder\inprogress"  echo trigger automations ) 

if exist work specific file, not wild cards * , ?. copy works wild cards.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -