Caveman
Jan 19th, 2000, 10:27 AM
I want to use the shell command to sort a simple text file. here is the code:
dim strCommandLine as string
dim sngMark as single
strCommandLine=App.path &"\" & batchFile
shell strCommandLine, vbMinimizedFocus
sngMark=timer
do
DoEvents
Loop Until timer-sngMark>5 'or 10 to let it 'do its jod
The batchfile is following:
c:\winnt\system32\sort.exe <somefile> anyfile
here the somefile is just simple text file.
The problem is that after the vb program, there is no "anyfile" being generated. But I can generated 'anyfile' if I do that batchfile in Dos systems.
I really really really want to know why. please Help, Thank you for reading. Thanx a lot for answering.
dim strCommandLine as string
dim sngMark as single
strCommandLine=App.path &"\" & batchFile
shell strCommandLine, vbMinimizedFocus
sngMark=timer
do
DoEvents
Loop Until timer-sngMark>5 'or 10 to let it 'do its jod
The batchfile is following:
c:\winnt\system32\sort.exe <somefile> anyfile
here the somefile is just simple text file.
The problem is that after the vb program, there is no "anyfile" being generated. But I can generated 'anyfile' if I do that batchfile in Dos systems.
I really really really want to know why. please Help, Thank you for reading. Thanx a lot for answering.