run BAT file through MEL

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2004   #1
run BAT file through MEL

I'm trying to run a BAT file that's in a different folder than maya/bin (it's in the user's scripts forlder to be exact) and I'm having trouble getting the system command to work right. Here's my best guess at it:

system ("\"%USERPROFILE%\My Documents\maya\5.0\scripts\webUpdate.bat\"");
// Result: 'C:\Documents' is not recognized as an internal or external command, operable program or batch file.
//


typing in "%USERPROFILE%\My Documents\maya\5.0\scripts\webUpdate.bat" (with quotes) from the DOS prompt works super.

Any suggestions?

(oh, and im not worried, this is for NT only)
__________________
Note: any errors of fact are directly attributable to me not knowing of what I speak
 
Old 03 March 2004   #2
hi goggie this work for me

system("start D:/run.bat" );
__________________

 
Old 03 March 2004   #3
Running the bat file wasnt a problem, it was the crazy path (which included spaces).

I got it working using this:
string $daScriptDir=`internalVar -userScriptDir`;
system ("start "+$daScriptDir+"update.bat");


thanks for the suggestion though.
__________________
Note: any errors of fact are directly attributable to me not knowing of what I speak
 
Old 01 January 2006   #4
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:50 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.