WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
CMD Prompt always starts in a different directory (Read 2757 times)
atomcc
YaBB Newbies
*
Offline



Posts: 6
CMD Prompt always starts in a different directory
May 11th, 2006 at 12:21am
 
Hi.

I am new to all of this but...

I have written a batch file that run a program in a certain directory with that references template .xml files for encoding video. For some reason, depending on whether the computer has be rebooted, the command line begins in different directories. Since I cannot put the path of the xml templates in the script, I am wondering how I can get this to work.

I know this may not be a watchdirectory question but I am wondering how I can do this with your program.

Here is a sample script where -j d176_5mins.xml is teh ecoding job I want it to perform:

set PATH=%PATH%;C:\Program Files\Helix\Helix Mobile Producer 11.0\;
hmprod.exe -j d176_5mins.xml -i e:\watch_3gp_cropped\CTV_newscast.avi -o e:\3GP_OUTPUT\FTP_d176\CTV_newscast.3gp

It will run hmprod just fine but won't know where to find d176_5mins.xml
Thanks.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: CMD Prompt always starts in a different direct
Reply #1 - May 11th, 2006 at 4:45am
 
Hello,

Can't you use the full path to the xml file? Something like
-j "C:\Program Files\Helix\Helix Mobile Producer 11.0\d176_5mins.xml"
(need to put "quotes" around the name because it contains spaces)

If not, you can also change the current directory before launching hmprod, for example
Code:
CD C:\xmlfiles\dir 



Quote:
hmprod.exe -j d176_5mins.xml -i e:\watch_3gp_cropped\CTV_newscast.avi -o e:\3GP_OUTPUT\FTP_d176\CTV_newscast.3gp


I assume CTV_newcast.avi is the "new file" that triggers the .bat file?

You can alter the above commandline like this
hmprod.exe -j d176_5mins.xml -i "%WD_FILE%" ....
%WD_FILE%" is replaced with the complete path and filename of the new file.

Likewise for the output file:

-o "e:\3GP_OUTPUT\FTP_d176\%WD_FILE_B%.3gp"

%WD_FILE_B% is replaced by the file title (without extension).

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
atomcc
YaBB Newbies
*
Offline



Posts: 6
Re: CMD Prompt always starts in a different direct
Reply #2 - May 16th, 2006 at 12:01am
 
Hey,

Thanks for your help! I appreciate it!

Jeff
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1