Sponsored Content
Full Discussion: one question for .bat file
Special Forums Windows & DOS: Issues & Discussions one question for .bat file Post 302258261 by Anta on Friday 14th of November 2008 06:59:27 AM
Old 11-14-2008
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..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need to create .bat file to store log file

Hi guys. Can someone point me to a resource that explains this? Basically these are websphere logs that need to be stored daily, I'm on sunOS 5.8. Each new file stored could have the current time as its filename. The script could be run on a cron which I can set up. I'm just not sure how to write... (0 Replies)
Discussion started by: dirtybrown
0 Replies

2. Shell Programming and Scripting

awk,gawk in bat file

Hi. I'm trying to convert bat file into shell script. Bat file invokes awk file in one section: c:\upg\exe\gawk -f c:\upg\awk\gen_sae.awk -v OP=C:\\upg\\lod\\... ...c:\upg\ref\saaxi.ref c:\upg\log\SAAEPWO.log c:\upg\ref\saaepref.log First of all I issued unix2dos command on that awk file.... (0 Replies)
Discussion started by: andrej
0 Replies

3. Shell Programming and Scripting

Run shell script from .bat file

hi how can I execute a shell script on unix server from a .bat file of windows desktop?? Regards. (3 Replies)
Discussion started by: Chaitrali
3 Replies

4. Windows & DOS: Issues & Discussions

Need solution for Bat FIle using FOR Cycle

Hi people. Don't know if you could help me, but here it goes anyway. I need to search for some directories, and if i for any file founded a must run another Bat file. Can this be done in DOS ? Thanks in advance (1 Reply)
Discussion started by: osramos
1 Replies

5. Shell Programming and Scripting

how to call a .bat file using KSH

Hi all, I am a very new user for korn scripting and in a process of learning. i have a .bat file that calls a .vbs file which calls a macro used to convert an excel spread sheet to .csv file... Now i want to automate this process. I want to call this bat file using a korn script or a korn... (16 Replies)
Discussion started by: bhagya2340
16 Replies

6. Shell Programming and Scripting

Simple bat file

Hi guys, I need a *.bat to run a ksh file in the shell on Windows NT...nothing more :) How do I do it? I tried with the following but it failed: set INFORMIXDIR=D:\user-applications\informix set PATH=%INFORMIXDIR%;%PATH% D:\user-applications\MKS\mksnt\sh.exe C:\hk_9.2\C3_weekly_auto.ksh... (4 Replies)
Discussion started by: Dird
4 Replies

7. Shell Programming and Scripting

Run cygwin in .bat file

Hello everyone, I've written quite a few AWK scripts to run in cygwin and now, I would like to run them one after the other in a .bat file. The problem is, I tried modifying the .bat file used to run cygwin in the first place, but whenever I change something, it doesn't work. The PATH is set up... (3 Replies)
Discussion started by: Teroc
3 Replies

8. Windows & DOS: Issues & Discussions

Executing .bat file

Hi , I have a bat file on windows machine ,I need to excute it from my local unix machine using sambe utility.Is there any comman to execute the .bat file remotely. Using samba utility i can post files to and fro from windows to unix but i don't comman to exute the .bat file. can any one... (2 Replies)
Discussion started by: Raamc
2 Replies

9. Shell Programming and Scripting

Need help with bat file!!!

I need to put/get files from Windows machine to Unix machine and vice-versa. I wrote a text file "ftp1.txt" as below. naga naga06 cd /root/Naga prom off get time.unl bye I wrote another bat file "ftp.bat" as below. ftp -n -s:C:\Users\Naga\Desktop\ftp1.txt IP_ADDRESS but... (2 Replies)
Discussion started by: Naga06
2 Replies

10. Windows & DOS: Issues & Discussions

DOS bat file to add to path

This may not be the right place, since it is not exactly unix or linux, but it does involve cygwin. I have two cygwin installations. When I start a mintty terminal, I need to toggle a windows path variable to make sure that the correct cygwin dll gets loaded. I need to add C:\cygwin\bin to the... (3 Replies)
Discussion started by: LMHmedchem
3 Replies
File::Which(3)						User Contributed Perl Documentation					    File::Which(3)

NAME
File::Which - Portable implementation of the `which' utility SYNOPSIS
use File::Which; # exports which() use File::Which qw(which where); # exports which() and where() my $exe_path = which('perldoc'); my @paths = where('perl'); - Or - my @paths = which('perl'); # an array forces search for all of them DESCRIPTION
"File::Which" was created to be able to get the paths to executable programs on systems under which the `which' program wasn't implemented in the shell. "File::Which" searches the directories of the user's "PATH" (as returned by "File::Spec->path()"), looking for executable files having the name specified as a parameter to "which()". Under Win32 systems, which do not have a notion of directly executable files, but uses special extensions such as ".exe" and ".bat" to identify them, "File::Which" takes extra steps to assure that you will find the correct file (so for example, you might be searching for "perl", it'll try perl.exe, perl.bat, etc.) Steps Used on Win32, DOS, OS2 and VMS Windows NT Windows NT has a special environment variable called "PATHEXT", which is used by the shell to look for executable files. Usually, it will contain a list in the form ".EXE;.BAT;.COM;.JS;.VBS" etc. If "File::Which" finds such an environment variable, it parses the list and uses it as the different extensions. Windows 9x and other ancient Win/DOS/OS2 This set of operating systems don't have the "PATHEXT" variable, and usually you will find executable files there with the extensions ".exe", ".bat" and (less likely) ".com". "File::Which" uses this hardcoded list if it's running under Win32 but does not find a "PATHEXT" variable. VMS Same case as Windows 9x: uses ".exe" and ".com" (in that order). Functions which($short_exe_name) Exported by default. $short_exe_name is the name used in the shell to call the program (for example, "perl"). If it finds an executable with the name you specified, "which()" will return the absolute path leading to this executable (for example, /usr/bin/perl or C:PerlBinperl.exe). If it does not find the executable, it returns "undef". If "which()" is called in list context, it will return all the matches. where($short_exe_name) Not exported by default. Same as "which($short_exe_name)" in array context. Same as the `where' utility, will return an array containing all the path names matching $short_exe_name. BUGS AND CAVEATS
Not tested on VMS or MacOS, although there is platform specific code for those. Anyone who haves a second would be very kind to send me a report of how it went. File::Spec adds the current directory to the front of PATH if on Win32, VMS or MacOS. I have no knowledge of those so don't know if the current directory is searced first or not. Could someone please tell me? SUPPORT
Bugs should be reported via the CPAN bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Which <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Which> For other issues, contact the maintainer. AUTHOR
Adam Kennedy <adamk@cpan.org> Per Einar Ellefsen <pereinar@cpan.org> Originated in modperl-2.0/lib/Apache/Build.pm. Changed for use in DocSet (for the mod_perl site) and Win32-awareness by me, with slight modifications by Stas Bekman, then extracted to create "File::Which". Version 0.04 had some significant platform-related changes, taken from the Perl Power Tools `which' implementation by Abigail with enhancements from Peter Prymmer. See <http://www.perl.com/language/ppt/src/which/index.html> for more information. COPYRIGHT
Copyright 2002 Per Einar Ellefsen. Some parts copyright 2009 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
File::Spec, which(1), Perl Power Tools: <http://www.perl.com/language/ppt/index.html>. perl v5.16.2 2009-09-26 File::Which(3)
All times are GMT -4. The time now is 07:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy