Results 1 to 2 of 2

Thread: Please Please Help me, I cann't breathe

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    brooklyn NY
    Posts
    1

    Post

    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.

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width