Sign in to follow this  
Followers 0
Spiff

Simple Commandline Problem

4 posts in this topic

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



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

$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

Hi,

that works!

THX

Spiff

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  
Followers 0