|
-
Dec 6th, 2000, 03:57 PM
#1
Thread Starter
New Member
Hi!
I have an application which needs to open a particular
directory, get a file , perform some operation on it and
move it to a different directory, then go to next file
and do the same thing..until the directory is empty.
The user just open's the particular directory and program has to do the rest automatically. Also I want to see the fileOpen dialog box during this process.
Please help.
--Kavitha
-
Dec 6th, 2000, 04:06 PM
#2
Fanatic Member
To establish a list file of a specific directory use this code.
Code:
'search for files in the specified folder
Dim fs, f, f1, fc, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.getfolder("c:\test")
Set fc = f.Files
For Each f1 In fc
fsubm = fsubm + 1
filess(fsubm) = f1.Name 'define list of files
Next
You will have files(a) the files of your directory (fsubm is the total number of files in the directory)
Then you can just process the files with the Scripting objects to move them.
Hope this helps,
W.
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Dec 6th, 2000, 04:19 PM
#3
Thread Starter
New Member
Hey Thanks!
But Is it possible to view the files being moved to the other directory ..for eg: in the fileOpen dialog box.
-
Dec 6th, 2000, 04:36 PM
#4
Fanatic Member
Well just use filess(fsubm), which has the name of the file that you are treating...
Sorry I don't have here the move code, hope you can manage.
W.
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Dec 6th, 2000, 04:39 PM
#5
Thread Starter
New Member
That's not a problem..Thanks.
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
|