- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: batch file vs. shell script
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
Forums
Discussions
Discussions
Discussions
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
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
12-04-2001 12:56 PM
12-04-2001 12:56 PM
batch file vs. shell script
I wrote a VB program to process some excel data files, those data files are in a specified directory E:\sims, I would like to have a NT batch file whick check the directory, if there are some excel files, it invoke the VB program to process the excel file one by one, it no excel file, do not do anything.
In shell, this is easy to get around by the following code.
#!/bin/sh
INFILE_PATH=/home/janez/sims
for each in ${INFILE_PATH}/*
do
if [ -f $each ]
then
VBprocess $each
rm -f $each
fi
done
Can anybody help me to have a batch file?
Thanks a lot,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 01:14 PM
12-04-2001 01:14 PM
Re: batch file vs. shell script
Get perl for NT!
http://www.perl.com/pub/a/language/info/software.html#win32
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 01:19 PM
12-04-2001 01:19 PM
Re: batch file vs. shell script
You can download cygwin (which provides shell functionality under windows environment - NT etc.) http://www.cygwin.com/
it is a really really good set of programs. check it out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 01:19 PM
12-04-2001 01:19 PM
Re: batch file vs. shell script
run a Bourne/Korn/POSIX shell script on
an NT machine.
Have a look at Cygwin (http://www.cygwin.com).
It provides a nice Unix-like environment under
Windows, including the GNU bash shell. Your
Bourne/Korn/POSIX scripts ought to work fine
under bash. Cygwin almost makes NT
usable :-).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 01:20 PM
12-04-2001 01:20 PM
Re: batch file vs. shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 01:48 PM
12-04-2001 01:48 PM
Re: batch file vs. shell script
e:
for /r %i in (\sims\*.xls) do VBProcess %i
del \sims\*.xls
NT shell scripting is not fun. Actually very frustrating for an Unix admin as it is pretty barbaric. If you have a lot of NT scripting to do and don't want to use perl or cygwin, then I'd get a copy of the book: Windows NT Shell Scripting by Tim Hill (Macmillan Technical Publishing) Its a very good reference for NT commands and scripting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 04:43 PM
12-04-2001 04:43 PM
Re: batch file vs. shell script
Thank you for the reponses, I decide to switch to perl since I found out we can perl application available and I heard before perl is similiar to unix shell(correct?)
it would be nice of you giving me sample code for this SIMPLE task?
Regards,
Jane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 06:41 PM
12-04-2001 06:41 PM
Re: batch file vs. shell script
I just figure out the simple solution for my proble.
a simple batch file with the following content is good enough
echo on
for %%i in (e:\sims\*.xls) do sims.exe %%i
especially thank bernie for the hint.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2001 11:03 AM
12-07-2001 11:03 AM