English

# How To: Create a directory using Avenue

## Summary

You can use the system.execute() request to send commands from ArcView to the Operating System.

## Procedure

• Option 1: The following line has a hardcoded pathname of the directory to be created. Insert it into your script, edit it as necessary, compile it, and run it:

`Code:System.Execute("c:\winnt\system32\command.com /c mkdir drive:\pathname")  `

• Option 2: The following code prompts you for the pathname of the directory to be created. Insert it into your script, edit it as necessary, compile it, and run it:

`Code:newDirectory = MsgBox.Input("c:\gis\data", "Create Directory", "")System.Execute("c:\winnt\system32\command.com /c mkdir"++newDirectory) `

`Note:You may need to do a Find to determine where command.com is located on your system.  `

`Note:For extended pathnames, make sure the directories preceding the one you want to create already exist.  `