Jump to content
Macro Express Forums

Easy Msdos Launch


Recommended Posts



I accidentally found an easier way to launch DOS commands yesterday; I have always had to use "bat" or even "lnk" files to get them to work, and I can't see that others have documented these; attrib/ set/ move/ xcopy as examples in this macro.


What do you think?



(Joe - you also had to use bat files (rather than just launch with parameters) for attrib before?;

Attrib bat


Link to comment
Share on other sites

That's interesting. I was just thinking about this as i have to create a macro to change a whole bunch of NTFS permissions. I found a command line utility in the resource kit but was wondering how to integrate it with ME. Thanks!

Link to comment
Share on other sites



That is a neat trick. Thank you for demonstrating it. I plan on using it in some of my macros.


This macro will not work on systems running Windows 98, Me or 95 but a simple change will allow it to run. Change the lines that say

Program Launch: "cmd.exe"


Program Launch: %ComSpec%

This causes Macro Express to ask Windows what program to use to load DOS. Windows 9x uses Command.exe while Windows 2003, XP, 2000 and NT use cmd.exe.

Link to comment
Share on other sites

Thanks, Kevin,

Using %comspec% you would have to change the

        If Not Window Title "%comspec%" running
line too; I will do it later.

I don't have all commands running , though; eg "set variable=something"; ? needs change in default directory (as does "attrib")

Best, Randall

Link to comment
Share on other sites



I'd like to thank you for your demonstration also. I've read in other posts about your preference for using the Environmental Variables with ME. I had it in the back of my mind to look closer at what you said.


Delete File or Files: "%AnswerTXT%"
Variable Set String %T7% "%DirPath%\hta3\*"
Variable Modify String: Append "%T3%%CRLF%" to %T4%

In your example, I see that you are using the Environmental Variable directly in your ME commands. It never crossed my mind to do it that way. Great idea.

Link to comment
Share on other sites


If you found dOS commands useful, here it is with more commands;This link Switches mainly defined

Note that DOS "FindStr" allows picking a line of text from text file (or directory of text files) using Wildcard matches ([Regular expressions]) (Wildcard is ".*", rather than "*"!!)



Attachment below with more help, and more options selectable

Best, Randall


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...