|
-
Jul 27th, 2000, 12:38 PM
#1
Thread Starter
Lively Member
Public Function FileFinder(WatchingDir As String)
Dim filename As String
FileFinder = Dir(WatchingDir)
Do Until FileFinder = ""
filename = FileFinder
If filename <> "" Then
Text1.Text = "Processing " & filename
MoveDir (filename)
End If
FileFinder = Dir
Loop
End Function
When I run the above code I get this error:
Run-Time error '5'
Invalid procededure call or argument
on this line
FileFinder = Dir
Any suggestions??
Using VB6 Still Pluging away
-
Jul 27th, 2000, 12:42 PM
#2
Lively Member
try this:
filefinder = Dir()
-
Jul 27th, 2000, 02:35 PM
#3
Thread Starter
Lively Member
Did not work, still the same error. Thanks for the help though.
Using VB6 Still Pluging away
-
Jul 27th, 2000, 02:47 PM
#4
transcendental analytic
You will get that error whenever you didn't specify which directory you search first.
Code:
FIleFinder=Dir(YourPath)
Then you can use Dir to find the next files or directories
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.
-
Jul 27th, 2000, 02:54 PM
#5
Thread Starter
Lively Member
I have that, but it won't loop through the directory with the MoveDir(filename) code in it. It gets stuck on the first file and won't do or move anywhere else. With the MoveDir(filename) not there it loops through the directory just fine.
Using VB6 Still Pluging away
-
Jul 27th, 2000, 05:05 PM
#6
transcendental analytic
How am i suppose to know what you have in MoveDir()?
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.
-
Jul 27th, 2000, 05:08 PM
#7
Hyperactive Member
try this
Try a on error resume next
Matt 
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
|