sanford101
Jan 16th, 2000, 09:12 AM
I have this trouble to use shell command to sort a simple text file from Visual Basic:
Here is the Visual Basic code:
Private sub CmdSort_click()
dim StrCommandLine as string
StrCommandLine=App.Path & "\Zsortsum.bat"
shell strCommandLine, vbMinimized
end sub
The batch file "Zsortsum.bat" is following:
c:\winnt\system32\sort.exe <c:\smy.tmp> c:\sumdoc.srt
The problem is that I can not get the file
sumdoc.srt generated ( or created) after I executed the Visual basic program( there is not error message in VB) . I can have the sumdoc.srt file generate if I use the batch file in DOS system. Could you tell me why? Thanks a lot!!!
Here is the Visual Basic code:
Private sub CmdSort_click()
dim StrCommandLine as string
StrCommandLine=App.Path & "\Zsortsum.bat"
shell strCommandLine, vbMinimized
end sub
The batch file "Zsortsum.bat" is following:
c:\winnt\system32\sort.exe <c:\smy.tmp> c:\sumdoc.srt
The problem is that I can not get the file
sumdoc.srt generated ( or created) after I executed the Visual basic program( there is not error message in VB) . I can have the sumdoc.srt file generate if I use the batch file in DOS system. Could you tell me why? Thanks a lot!!!