Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

1 Answer 1

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
2  
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

 
discard

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.