Hello...
How to create a directory at runtime... with the name given in textbox... in the app.path...
and how to create the database.. douplicate.... (dump).... in that new (created) folder...
thanks in advance...
Printable View
Hello...
How to create a directory at runtime... with the name given in textbox... in the app.path...
and how to create the database.. douplicate.... (dump).... in that new (created) folder...
thanks in advance...
MkDir for the directory
to create a directory runtime:
mkdir app.path & "\" & text1.text
VB Code:
Public Sub subCreateFolger(PathName As String) If Right(PathName, 1) = "\" Then PathName = Left(PathName, Len(PathName) - 1) End If Dim Curdirname As String On Local Error GoTo ErrHandler Curdirname = CurDir ChDir PathName ChDir Curdirname Exit Sub ErrHandler: If Err = 76 Then MkDir PathName Resume Next End If Resume Next End Sub
Thank you very much... for your guidence...
It is working perfectly... as I wished...
and is there any way to overwrite an existing directory...?
if the directory already exists... it should be removed with confirmation... and new one should be created...
[ is there any way to Delete a directory thru vb program...?]
And one more thing i would like to ask... that...
i am having a file... named "project.mdb" in the app.path.
i want to copy the file in to newly created directory...
in current directory there is a file project.mdb
i want to create new directory...
let us suppose... MyDir, this directory should consists of project.mdb file.
waiting for reply...
Hai...
I got the answer to my question...
it is nothing but... Filecopy method.
i.e.
SourceFile as string
DestinationFile as string
FileCopy SourceFile, DestinationFile
--------------------------------------------------------
FileCopy "C:\abc.txt", "C:\Temp\abc.txt"
--------------------------------------------------------