Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



asp .net create directory

Home   ASP.NET   asp .net create directory         


You could create a directory in asp .net using CreateDirectory Function. The below code creates a directory. I am using this code in a webservice and it works fine

    Public Function CreateDirectory(ByVal DirectoryName As String) As String
        If Directory.Exists(Server.MapPath(DirectoryName)) Then
            Return "Directory Already Exist"
        Else
            Try
                Directory.CreateDirectory(Server.MapPath(DirectoryName))
                Dim oMenu As New cMenu
            Catch ex As Exception
                Return "Failue" + ex.ToString
            End Try
        End If
        Return "Success"
    End Function


To Call the above code 
CreateDirectory(/ASP/C++)

Please pass the path. This would create a directory under ASP. 

I think the code is self explanatory





  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam