You could write a windows script.
Using the run method of the WSript.Shell object you can tell it to wait
until the tak completes before continuing.
Something like:
' *********************************************
Dim wshShell
dim strShell1
dim strShell2
dim strshell3
Set WshShell = CreateObject("WScript.Shell")
' ****************************************
' You need to change these paths
Const FILE_SOURCE = """e:\automation\data\source.txt"""
Const FILE_TARGET = """e:\automation\archive\target.txt"""
CONST WINDOW_STYLE = 1
CONST WAIT_FOR_TASK = -1
' ************************************************** ***
' contracts3
strShell1 = "CMD /c DEL " & FILE_TARGET
strShell2 = "CMD /c copy " & FILE_SOURCE & ", " & FILE_TARGET
strshell3 = "c:\somedir\some.mdb"
On Error Resume Next
WshShell.Run strshell1, WINDOW_STYLE, WAIT_FOR_TASK
On Error GoTo 0
WshShell.Run strshell2, WINDOW_STYLE, WAIT_FOR_TASK
WshShell.Run strshell3, WINDOW_STYLE
SET WshShell = Nothing
' *********************************************
Alternatively you could instantiate a FileSystemObject in the scipt and use
that to copy the file.
Look in MSDN for more help
--
Terry Kreft
"MLH" <CR**@NorthState.net> wrote in message
news:br********************************@4ax.com...
I would like to launch an A97 runtime
application, doing one additional thing
immediately prior to launching.
Here's the Target property setting of
the desktop icon I now use to launch
the runtime app:
"C:\Program Files\AppDir\MyApp.mde"
What I want is to do immediately prior
to opening the A97 runtime application is
perform a simple DOS activity first: I want
to copy c:\FileA.ext to c:\FileB.ext. I want
to wait for the operation to complete before
launch of the runtime app.
Can someone recommend some kind of
windows batching method which would enable
me to copy my file and launch my A97 app by
dbl-clicking only a single icon on the desktop?
I heard windows XP had something like that
built-in. If it does, I can't find it.