Thanks for the response. I have made progress. The Original problem was my dumb fat finger error. The command line program now loads viewport and runs the viewport program, and does creat the csv file. My remaining problem is that the "/d" option never causes viewport to exit. Please help !
cd Program Files (x86)
rem /r1000 = sample once each second — r60000 sample once each minute
rem /d40 = samples for 40 seconds — d3600 samples for 1 hour, d21600 = 6 hours
rem .txt= save as text file, .csv save as spreadsheet file
Viewport/f "C:Program Files (X86)Parallax IncPropeller Tool v1.3My Programscell phone project 6 2 2012humidity 6 10 2012 a viewport.spin" /a "c: ddd.csv" /r1000 /d40
cd batch files