1.

Solve : Project all the images/newest images that were added to the directory(.bat,cmd)?

Answer»

I was able to project all the level 2 hdf files and saved the projected files to the new(CREATED) directory using this script:

set in_path=in_path
set out_path=out_path

md %out_path%
cd /d %in_path%

FORFILES /m *L2_LAC*.hdf /C "cmd /c gdalwarp -geoloc -t_srs EPSG:4326 -te 113.205 1.120 157.105 2.005 HDF4_SDS:hdf:file:01 %out_path%\fname.tif"*

But there is one last thing that I need to MAKE this goal complete:

How am I going to AUTOMATICALLY detect all the newest projected images that were added to the directory from time to time and then project it immediately?Because everyday I am DOWNLOADING hdf files and then if there are new files I'll project it from time to time which is a WASTE of time. That's why I need it in batch process and automatic. How will I complete this project using the script below?

for /f "tokens=1,2,5" %a in ('dir /-b /o-d /tc') do if %a==%date:~4% (if %b==%time:~0,5% (echo %c)



Discussion

No Comment Found