forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Setting current directory for run operations

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Seffyroff
Newbie


Joined: 08 Apr 2002
Posts: 15

PostPosted: Tue Apr 16, 2002 11:05 am    Post subject: Setting current directory for run operations Reply with quote

I'm trying to run an external cmdline program, pipe it's output to a text file, then display that in a list window. There's one hitch. The program performs it's operation only if you are in the directory with the files you wish to perform the operation on.

this is what i'm currently doing:
Code:

RUN %B\targs.exe, %A\resource\ps2\levels\%K\textures\*.tga -32 >c:\targs-out.txt, WAIT

Which makes targs.exe crash because it won't accept a different directory path to the files for processing.
I've also tried this:
Code:

SHELL open, %B\targs.exe, *.tga -32 >c:\targs-out.txt, %A\resource\ps2\levels\%K\textures\, WAIT

Which makes targs.exe work, but doesn't pipe it's output to file for some reason.

Any ideas how i can get around the bug in my targs.exe?
I thought about using a batch file, but would rather not if possible Sad
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Apr 16, 2002 11:34 am    Post subject: Reply with quote

How about:

Code:
DIRECTORY CHANGE, %A\resource\ps2\levels\%K\textures\
RUN %B\targs.exe, *.tga -32 >c:\targs-out.txt, WAIT


Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Seffyroff
Newbie


Joined: 08 Apr 2002
Posts: 15

PostPosted: Tue Apr 16, 2002 11:36 am    Post subject: Reply with quote

Doh! that'll do it! nice one, thanks!
BTW, any ideas why i couldn't pipe to a text file from SHELL OPEN?
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1752
Location: Space and Time

PostPosted: Tue Apr 16, 2002 12:07 pm    Post subject: Reply with quote

It will not work that way. You need to use
the Run command /c MyProg.exe >log.txt
or on win2k cmd /c MyProg.exe >log.txt

It would be nice to do it without command/cmd
but... Rolling Eyes

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Apr 16, 2002 12:10 pm    Post subject: Reply with quote

I think that it is a question of the fact that the redirect part of the command line is not actually
a parameter for your DOS program but rather a way of telling DOS to redirect the program's output
to a file instead of the monitor.

You may try this also:
Code:
RUN COMMAND /C %B\targs.exe %A\resource\ps2\levels\%K\textures\*.tga -32 > c:\targs-out.txt, WAIT


Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Tue Apr 16, 2002 1:10 pm    Post subject: Reply with quote

You should use COMMAND.COM even on Windows 2000 rather than CMD.EXE, so that it'll work on either platform. I think it may be possible to pipe the output even with the SHELL command. I just tried and it works just fine like this:

Code:

  directory change,C:\
  shell open,command.com,/C dir > test.txt



Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group