File Manipulation

  • Thread starter Thread starter Ken Barz
  • Start date Start date
K

Ken Barz

Hi,

I have a program that currently will give me the names of
all the files in a directory. What I would like to do
from here is:

1. Submit a command to Windows to have it run a SAS
program using each file at a time. (I have the syntax of
the command I need, just don't know how to get VB to do
it.)

2. Then, when the SAS program is done, I would like to
move each file to an archive directory and delete it from
the main directory.

Any ideas?
Thanks,
Ken
 
consider X directory has all the files u want to process..

so it will go like this.

dim sFile as String
dim oProc as Process
dim oProcStart as processstartinfo
for each sFile in Directory.GetFiles(pathtoX)
oprocstart.arguments = sfile
oProc = Process.Start(oProcStart)
oproc.waitforexit
file.move(source,destination)
next
 
Back
Top