Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anybody know how to create a new folder with arcobjects? This is what I want to do: insert a text in a TextBox and, when I run the aplication, it will create a folder with the name wroten in the TextBox.

Thanks, Alex

share|improve this question

I'm not sure about using ArcObjects but you can use VB.NET, see below.

Dim value as string
textbox1.text = value

    If (Not System.IO.Directory.Exists("C:\" & value)) Then
                    System.IO.Directory.CreateDirectory("C:\" & value)                
End If
share|improve this answer
It was more simple that I thought: – Alex Aug 1 '11 at 13:40
It was more simple that I thought: Dim path As String Cnc = UCase(TextBox1) path = "c:\temp\teste\" & Cnc MkDir path Thanks anyway – Alex Aug 1 '11 at 13:41
BTW, for the non-simple (arcobjects) way, I suppose you could use IGxFile.New after setting IGxFile.Path on the GxFolder coclass. – Kirk Kuykendall Aug 1 '11 at 13:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.