Running DOS Internal commands - SOLVED

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Running DOS Internal commands - SOLVED

Post by mightycpa » Thu Jan 19, 2017 6:20 pm

Is there any way to run a dos internal command, like DIR *.TXT from the command prompt?

I'm not talking about using GetFileList instead, or to write a batch file and run that. I'm wondering if MS can execute dos internal commands directly.

Thanks
Last edited by mightycpa on Fri Jan 20, 2017 4:09 pm, edited 1 time in total.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Running DOS Internal commands

Post by Marcus Tettmar » Fri Jan 20, 2017 10:58 am

Sure. Use the Run command:

Code: Select all

Let>RP_WAIT=1
Run>cmd.exe /c dir c:\*.txt >> "%TEMP_DIR%\temp.txt"
ReadFile>%TEMP_DIR%\temp.txt,allText
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Running DOS Internal commands

Post by mightycpa » Fri Jan 20, 2017 4:08 pm

Too simple! Didn't think of that, thanks.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: Running DOS Internal commands - SOLVED

Post by CyberCitizen » Mon Jan 23, 2017 2:05 am

Yes I use this alot, very handy.
FIREFIGHTER

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Running DOS Internal commands - SOLVED

Post by Dorian (MJT support) » Mon Jan 23, 2017 6:54 pm

CyberCitizen wrote:Yes I use this alot, very handy.
Definitely! DOS is still alive! :D
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts