PDA

Click to See Complete Forum and Search --> : Please Please Help me, I cann't breathe


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.

Mark Sreeves
Jan 19th, 2000, 08:08 PM
Sorry but I can't tell you why.

However, if you specify the full path for the target file in the batch file it works OK!

------------------
Mark Sreeves
Analyst Programmer

Mark.Sreeves@Softlab.co.uk
A BMW Group Company