Search found 6 matches

by logical_bit
14 Dec 2016 18:36
Forum: DOS Batch Forum
Topic: Doskey Macros
Replies: 12
Views: 7179

Re: Doskey Macros

Really? How am I executing my code versus yours? I noticed this in the doskey help file D:\>doskey /? Edits command lines, recalls Windows commands, and creates macros. DOSKEY [/REINSTALL] [/LISTSIZE=size] [/MACROS[:ALL | :exename]] [/HISTORY] [/INSERT | /OVERSTRIKE] [/EXENAME=exename] [/MACROFILE=...
by logical_bit
14 Dec 2016 17:24
Forum: DOS Batch Forum
Topic: Doskey Macros
Replies: 12
Views: 7179

Re: Doskey Macros

Squashman wrote:And what is the difference between how I did it and how you are trying to do it?


None. As you can see I literally copied and pasted your code.

I've no idea why the prompt is spitting out "a was unexpected at this time"...
by logical_bit
14 Dec 2016 15:46
Forum: DOS Batch Forum
Topic: Doskey Macros
Replies: 12
Views: 7179

Re: Doskey Macros

Do exactly what I did and then copy and paste everything into the forums . D:\>type "doskey loop.cmd" @echo off rem doskey for loop doskey test=set limit=5 $T (FOR /L %a in (1,1,5) do @if %a==%limit% (echo loop c omplete) else (echo %a))>%UserProfile%\Desktop\log.txt echo. exit /b D:\>dos...
by logical_bit
13 Dec 2016 14:59
Forum: DOS Batch Forum
Topic: Doskey Macros
Replies: 12
Views: 7179

Re: Doskey Macros

H:\>doskey test=set limit=5 $T (FOR /L %a in (1,1,5) do @if %a==%limit% (echo loop complete) else (echo %a))^>log.txt H:\>doskey /macros test=set limit=5 $T (FOR /L %a in (1,1,5) do @if %a==%limit% (echo loop complete) else (echo %a))>log.txt H:\>test H:\>type log.txt 1 2 3 4 loop complete H:\> I a...
by logical_bit
13 Dec 2016 14:31
Forum: DOS Batch Forum
Topic: Doskey Macros
Replies: 12
Views: 7179

Re: Doskey Macros

H:\>doskey test=set limit=5 $T FOR /L %a in (1,1,5) do @if %a==%limit% echo loop complete H:\>test H:\>loop complete H:\> Thank you! Always a pleasure to learn something new edit: I tried this: D:\>doskey a=set limit=5 $T for /l %a in (1,1,5) do @echo %a $T @if %a==%limit% echo loop complete D:\>a ...
by logical_bit
13 Dec 2016 13:35
Forum: DOS Batch Forum
Topic: Doskey Macros
Replies: 12
Views: 7179

Doskey Macros

Hello, I'm a first time poster here, and I'm very happy to have discovered this website! I was curious if it was possible to group compound statements in a Doskey macro. Meaning would it be possible to group for loops and/or if statements or even nested if statements in a Doskey macro? for example: ...