Jump to content
Sign in to follow this  
Spiff

Simple Commandline Problem

Recommended Posts

Spiff

Hello,

i'm new to AutoIt and have this small problem.

I want to create a folder subject to a variable give in the commandline.

Example:

"createdir.exe blabla" should create the folder "C:\test\blabla"

But with my code:

$path="$CmdLine[1]"

DirCreate("C:\test\" & $path)

I get "C:\test\$path"

How can i solve this problem?

THX

Spiff

Share this post


Link to post
Share on other sites
GaryFrost

Hello,

i'm new to AutoIt and have this small problem.

I want to create a folder subject to a variable give in the commandline.

Example:

"createdir.exe blabla" should create the folder "C:\test\blabla"

But with my code:

$path="$CmdLine[1]"

DirCreate("C:\test\" & $path)

I get "C:\test\$path"

How can i solve this problem?

THX

Spiff

$path= $CmdLine[1]

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
Don N

$path="C:\test\" & $CmdLine[1]

MsgBox( 0, "", $path )

DirCreate($path)

You dont need the MsgBox() line of course but that jsut shows the path while testing. Hope this helps.


_____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.