Computing.Net > Forums > Windows NT > Win NT batch file Help please

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Win NT batch file Help please

Reply to Message Icon

Name: tlee
Date: March 5, 2001 at 08:46:40 Pacific
Comment:

Hey, I'm new to batch programming for NT.
I don't have an NT box to test on, and I have to get this file done today. Please find my 'stupid questions of the day' below ;)

Can someone tell me if I'm correct in assuming:
1) NT filenames are case sensitive
(ie - IF EXIST "C:\PROGRAM FILES\QUICKTIME\QUICKTIMEPLAYER.exe ...
won't work when the path is really:
"C:\Program Files\QuickTime\QuickTimePlayer.exe)

2)dos batch commands are case INsenstive in NT as they are in win 9x
ie - "IF EXIST" is the same as "if exist"

Thanks very much for any assistance provided.



Sponsored Link
Ads by Google

Response Number 1
Name: Frank
Date: March 5, 2001 at 10:49:03 Pacific
Reply:

NT filenames are not case sensitive



0

Response Number 2
Name: daryl
Date: March 5, 2001 at 10:50:50 Pacific
Reply:

all dos commands except for some switches are case insensative, so your IF EXIST "C:\PROGRAM FILES\QUICKTIME\QUICKTIMEPLAYER.exe statement should work just fine.


0

Response Number 3
Name: Frank
Date: March 5, 2001 at 10:51:06 Pacific
Reply:

Sorry I forgot youre second Question. Yes, dos batch commands are case INsenstive


0

Response Number 4
Name: tlee
Date: March 5, 2001 at 11:34:53 Pacific
Reply:

Thanks to all who replied... unfortunately, I'm no closer. Perhaps some endeavoring soul can tell me why the following batch file isn't working on an NT system-
excerpts follow:
@ECHO OFF
IF Windows_NT == %OS% GOTO WIN_NT
...
:WIN_NT
:test for presence of standard quicktime installation.
IF EXIST "C:\PROGRAM FILES\QUICKTIME\QUICKTIMEPLAYER.exe" GOTO RUN_QT_NT
ECHO Could Not Locate QuickTimePlayer. Initializing the Installer.
GOTO INSTALL_QT

:RUN_QT_NT
IF EXIST D:\CLICKME.MOV GOTO PLAY_QT_NT
ECHO Windows NT users note that in order for autoplay to function, your
ECHO CD drive must be designated "D".
ECHO If you want to enable the autoplay feature, please map your CD drive
ECHO to "D" and reinsert the SHAW_ALMEX CD.
ECHO For manual start, simply double-click on the file "CLICKME.MOV"
ECHO in the root directory of the CD.
PAUSE
GOTO END

:PLAY_QT_NT
"C:\PROGRAM FILES\QUICKTIME\QUICKTIMEPLAYER.exe" D:\CLICKME.MOV
IF ERRORLEVEL 1 GOTO FAILURE
GOTO END

:INSTALL_QT
"\QUICKTIME\QUICKTIMEINSTALLER.exe"
IF ERRORLEVEL 1 GOTO FAILURE
ECHO After Quicktime has completed the installation process, eject the
ECHO SHAW_ALMEX CD and then re-insert it for autostart.
PAUSE

:END
EXIT

====end excerpt====

This code is being run from a batch file on a CD which is called in an autorun.inf file.
The CD contains:
a file called CLICKME.MOV
a dir called QuickTime which contains a file
called QuickTimeInstaller.exe

Again, any help is most appreciated.
reaching desparation ;)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows NT Forum Home


Sponsored links

Ads by Google


Results for: Win NT batch file Help please

How to obtain the Win NT MIB file www.computing.net/answers/windows-nt/how-to-obtain-the-win-nt-mib-file/16193.html

User input in NT Batch files www.computing.net/answers/windows-nt/user-input-in-nt-batch-files/20640.html

NT Batch File www.computing.net/answers/windows-nt/nt-batch-file/4206.html