Jump to content

Simple Commandline Problem


Recommended Posts

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

Link to comment
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.

 

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...