-
Hi, I was writing a Personal Directory for my self and I have a function in my program which would copy the databse to some other place well I used the filecopy function. like:
source = "c:\dbase.dat"
Distination = dirdistination.path & "\dbase.dat"
file copy source, Distination
well the above code does work perfectly as long as my path is forexample:
c:\program files
then the program would put the file in
c:\program files\dbase.dat
but if my starting path is
a:\
then I get an error message labeling path not found because what would happen is the path would look like this
a:\\dbase.dat
Well, I am just looking for a way to solve this problem. I know there are some way but I just can't find them. Please I really need help.
Thanks Alot
:confused:
======================
VB Learner
MMSS
++++++++++++++++++++++
-
before : Distination = dirdistination.path & "\dbase.dat"
check dirdistination.path like this: if right(dirdistination.path,1) <> "\" then dirdistination.path = dirdistination.path & "\"
next, instead of dirdistination.path & "\dbase.dat" use this : Distination = dirdistination.path & "dbase.dat"
that should remove the \\ problem