Talk:Windows Programming/Programming CMD
What about this for example:
for /R %%A in (*.mpg) do IF NOT EXIST "%dgindex%" "%~1%%~pnA.d2v" -AIF=[%~1%%~pnxA] -OF=[%~1%%~pnA] -exit
as an example for parsing all .d2v files within a directory using DGIndex (a program part of video-editing).
I didn't write the command myself, but I just tweaked the one I was given to suit the task at hand. Can anyone explain the use of the 'A' variable instead of 'I' in %~1%%~pnxA, and maybe explain fully what exactly is implied here?
Command Line -- Interfacing
editI created CountArgs.exe and counts.bat precisely according to your examples, and the value returned in DOS prompt wasn't 3, but 4. Is there any mistake?
I believe so, I have attempted to correct it--AAdaamS (talk) 11:48, 30 July 2008 (UTC)
Format of wiki page
editSorry for being negative, but the formating of the wiki text is quite bad. If just feels someone has copied the text from somewhere.
Method of getting user input
editUser input in DOS is very hard to get, but there are two things that you can do: SET /p and CHOICE.COM. The former is a DOS command that puts user input into a variable. The latter is a dos program you can download. I might document these some time in this book if I can. PiemanXC (talk) 14:48, 3 March 2008 (UTC)
Variables are always strings
editWhen saving variables, they are always saved as strings. The current text wrongly states that set /a num=123 would be saved as number, which is wrong. The truth is that everything right from the equals sign is _interpreted arithmetically_ when the /a option is given.
There are probably other similar mistakes in the book, and it should be carefully proofread by an experienced programmer.
--Roland Illig (discuss • contribs) 02:26, 29 October 2016 (UTC)