randallc Posted June 29, 2005 Report Share Posted June 29, 2005 Hi, 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? Randall (Joe - you also had to use bat files (rather than just launch with parameters) for attrib before?; Attrib bat MSDOSlaunch.mxe Quote Link to comment Share on other sites More sharing options...
Cory Posted June 29, 2005 Report Share Posted June 29, 2005 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! Quote Link to comment Share on other sites More sharing options...
kevin Posted June 29, 2005 Report Share Posted June 29, 2005 Randall, 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" to 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. Quote Link to comment Share on other sites More sharing options...
randallc Posted June 29, 2005 Author Report Share Posted June 29, 2005 Thanks, Kevin, Using %comspec% you would have to change the If Not Window Title "%comspec%" runningline 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 Quote Link to comment Share on other sites More sharing options...
jowensii Posted June 30, 2005 Report Share Posted June 30, 2005 randallc, 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. Quote Link to comment Share on other sites More sharing options...
randallc Posted July 2, 2005 Author Report Share Posted July 2, 2005 Hi, 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 "*"!!) MSDOSlaunch1 Attachment below with more help, and more options selectable Best, Randall MSDOSlaunchHelp1.mxe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.