- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: no file found running batch file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 06:44 AM
тАО07-29-2009 06:44 AM
here the batch:
adddb.bat - cp /recital/userx.db /recital/users.db
adderic.bat - cp /recital/run/xusers.db /recital/run/users.db
thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 06:55 AM
тАО07-29-2009 06:55 AM
SolutionIssue is not clear on your post. Could you elaborate the issue details?
Are you running any script to copy some files? if so provide the script contents?
Are you running any cron job?
I have heard batch files only on windows..
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 08:09 AM
тАО07-29-2009 08:09 AM
Re: no file found running batch file
adddb.bat - cp /recital/userx.db /recital/users.db
adderic.bat - cp /recital/run/xusers.db /recital/run/users.db"
I take it the above are the names of 2 shell scripts and there contents.
the questions are:
1)which one are you actually running (or are you running a 3rd that is supposed to run the two above)?
2) how are you running whatever it is you are actually running?
-and-
3) what exactly does running it produce?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 10:33 PM
тАО07-29-2009 10:33 PM
Re: no file found running batch file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 11:26 PM
тАО07-29-2009 11:26 PM
Re: no file found running batch file
adddb.bat - is this a batch file you are running?
and
cp /recital/userx.db /recital/users.db
is the batch file adddb.bat file contains only the above command?
Could you give us the batch file name you are running and contents of the batch file?
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2009 12:52 PM
тАО07-30-2009 12:52 PM
Re: no file found running batch file
SO....
some file named "adddb.bat" contains the following:
cp /recital/userx.db /recital/users.db
---AND ---
some file named "adderic.bat" contains the following:
cp /recital/run/xusers.db /recital/run/users.db
IS THE ABOVE CORRECT???? A simply yes or no will suffice.
IF IT IS CORRECT, then:
1) at the command line, you type EXACTLY WHAT?
2) what EXACTLY, is the error message. not just FILE NOT FOUND.
I suspect its as simple as an issue with the "bat" files not in the PATH, but you insist on ignoring questions.
HINTS:
I) if it says "adddb.bat" or "adderic.bat" NOT FOUND, then the location of the bat file(s) aren't in your current path and you need to provide either:
a) the full path to it, or, if
b) if they reside in the current working directory, source them, as in
. ./adderic.bat (that's dot space dot slash)
c) modify the PATH to include the directory where they are located (but DON'T set it to ".")
II) If it says something like "cp ....FILE NOT" found, then file named in the script is not found where you think it should be.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2009 07:47 PM
тАО07-30-2009 07:47 PM
Re: no file found running batch file
root@SGCJMI[/disk1/eric]adddb.bat
sh: adddb.bat: not found.
root@SGCJMI[/disk1/eric]adderic.bat
sh: adderic.bat: not found.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2009 07:54 PM
тАО07-30-2009 07:54 PM
Re: no file found running batch file
[/disk1/eric]adddb.bat
sh: adddb.bat: not found.
To execute a script, As OldSchool said, either:
1) This directory must be in $PATH.
2) You must use an absolute path: $PWD/adddb.bat
3) You must use ./adddb.bat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2009 08:16 PM
тАО07-30-2009 08:16 PM
Re: no file found running batch file
> 3) You must use ./adddb.bat
Actually, I believe:
2) You must specify a path to the script.
This can be an absolute path, like
/disk1/eric/adddb.bat
or a relative path, like:
./adddb.bat
or:
../eric/adddb.bat
(But something with a "/" in it.)
3) There is no "3)".
Note that when you show your actual commands
and error messages, instead of vague
descriptions, it's easy to spot the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2009 08:38 PM
тАО07-30-2009 08:38 PM
Re: no file found running batch file
I was making it very simple and specific for a script in the current directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2009 08:57 PM
тАО07-30-2009 08:57 PM
Re: no file found running batch file
root@SGCJMI[/disk1/eric]adddb.bat
sh: adddb.bat: not found.
root@SGCJMI[/disk1/eric]adderic.bat
sh: adderic.bat: not found.
As all said you have to give full path of the batch file.
check your file is physicly there or not
if yes then check for the execute permission.
if execute permission is there then you can run your batch program just give the batch name at the command prompt.
or else you have to run like this
root@SGCJMI[/disk1/eric]sh ./adddb.bat
root@SGCJMI[/disk1/eric]sh ./adderic.bat
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2009 08:57 PM
тАО07-30-2009 08:57 PM
Re: no file found running batch file
3 is simpler than 2?
Things should be made as simple as possible,
but no simpler. Simple and False are
spelled differently for a reason.
"You can't do it" is very simple, too, but
it's not true, either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2009 10:25 PM
тАО07-30-2009 10:25 PM
Re: no file found running batch file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2009 12:33 AM
тАО07-31-2009 12:33 AM
Re: no file found running batch file
Maybe, there were lots of words in your revised 2). :-)