The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Windows & DOS: Issues & Discussions
.
google unix.com



Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FTP file question. smc3 Shell Programming and Scripting 1 07-24-2008 07:41 PM
tar file question chaoses UNIX for Dummies Questions & Answers 4 07-17-2008 02:14 PM
mk file question felixmat1 Shell Programming and Scripting 2 10-11-2007 10:51 PM
Post Shell programming: Question about source a file and read data from the file ccwq Shell Programming and Scripting 3 08-04-2007 10:28 PM
Newbie question about difference between executable file and ordinary file Balaji UNIX for Dummies Questions & Answers 1 11-29-2000 06:49 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-14-2008
Anta Anta is offline
Registered User
  
 

Join Date: Dec 2004
Posts: 15
one question for .bat file

Hi!

I'm very sorry for such simple and silly question but I cannot answer it by myself.
Can you please help me?

In .bat file I should run the C program which is in other directory, and the input configuration file is in this directory too.
This dir name is in dirRun variable. The name of the conf file is in conf variable.
The command is:
"%dirRun%\program.exe" "%dirRun%\%conf%"
It failed because a blank appears between directory name and program.exe and conf file name.
The /bat file works on Windows 2000.

Thank you in advance,
Anta

Last edited by Anta; 11-14-2008 at 08:06 AM..
  #2 (permalink)  
Old 11-14-2008
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,293
I'm afraid you're on a wrong forum with this question, this is a Unix/Linux forum.
Having saying that, you can try to quote the variables like:

Code:
"%dirRun%"\program.exe "%dirRun%"\"%conf%"
  #3 (permalink)  
Old 11-14-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Wink

Well, this subforum is "Special Forums - Window & DOS"... so perhpas it is acceptable here.

Your variable dirRun would be where I would look for further info. Perhaps there is a space at the end of the variable.
I script in DOS to coordinate data with my unix system, so how you approached looks fine.

set dirRun=c:\mydir
%dirRun%\program.exe

should be fine.
  #4 (permalink)  
Old 11-14-2008
Anta Anta is offline
Registered User
  
 

Join Date: Dec 2004
Posts: 15
Sorry - yes, you are right.
I'll try to find the need field to question.
Thank you!
Anta

P.S. To my regret your variant doe not work for me.
A.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This 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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0