Jump to content
Sign in to follow this  
benjybee1

Little Comspec help

Recommended Posts

benjybee1

Hi, I havent used autoit for a while and I have forgot a lot.

I have a simple question

I want to run in dos the following

D:

cd p

md newfolder

How can I do it with comspec

I know this is a very simple question. Use autoit, if not, you forget a lot :)

Share this post


Link to post
Share on other sites
rmarino

Hi, I havent used autoit for a while and I have forgot a lot.

I have a simple question

I want to run in dos the following

D:

cd p

md newfolder

How can I do it with comspec

I know this is a very simple question. Use autoit, if not, you forget a lot :)

Do you need to do it that way? If not you can use DirCreate ("d:\p\newfolder")

Share this post


Link to post
Share on other sites
benjybee1

Yes, I know about that method, but I want to be this done from the command prompt

Thank you

Share this post


Link to post
Share on other sites
rmarino

Then simply use the run or runwait methods:

RunWait(@ComSpec & " /c md d:\p\newfolder")

Share this post


Link to post
Share on other sites
benjybee1

It works

Thank you for your fast answer and help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×