|
-
May 25th, 2000, 05:34 AM
#1
Thread Starter
Junior Member
Hello,
I tried to copy a certain directory using:
FileCopy "C:\bla bla", "A:\"
It returns a message saying:
"Path/File Access Error"
Can anyone help?
Thank you
-
May 25th, 2000, 05:53 AM
#2
Here's an example. Make a Form with 2 CommandButtons.
Put this code in Command1
Code:
Private Sub Command1_CLick()
Open "C:\test.txt" For Output As #1
Print #1, "abcdefghijklmnopqrstuvwxyz"
Close #1
End Sub
Put this code in Command2.
Code:
Private Sub Command2_Click()
SFile = "C:\ttt.txt"
DFile = "A:\"
FileCopy SFile, DFile
End Sub
-
May 25th, 2000, 05:55 AM
#3
transcendental analytic
You cannot copy a folder automatically. To do it manually
Make the main sub using mkdir
Loop trough all items in you subdir by using dir or fso object and copy the files independently.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 25th, 2000, 05:59 AM
#4
Thread Starter
Junior Member
Thanks, but how do you make the loop to send the files in the folder to "A:"?
-
May 25th, 2000, 06:08 AM
#5
transcendental analytic
HAven't tested it, i just wrote it down here
Code:
Dim a$
A=dir(yourdir)
do while len(a)
filecopy a, "a:\" & a
a=dir
loop
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|