Solved

If Exist ?  WinNT vs Win2K

Posted on 2004-04-16
4
146 Views
Last Modified: 2010-04-13
Good Morning,
I'd like to use the "If Exist" statement in the logon script to copy some files to my client PC's.  I have a mix of NT4 and 2K workstations, and the different OS's need different files copied to them.  Are there files that exist in NT but not in 2K, and files that exist in 2K but not in NT?
I was thinking about a batch file that looks like this:
>>> If exist "NTspecificFile.abc" go to NT
>>> If exist "2KspecificFile.abc" go to 2K
>>> NT
>>> copy command
>>> goto END
>>> 2K
>>> copy command
>>> goto END
>>> END

I appreciate your assistance.
Thank you in advance,
Dougget
0
Comment
Question by:Dougget
4 Comments
 
LVL 20

Accepted Solution

by:
Dufo G. Belski earned 125 total points
ID: 10841639
Check the solution provided by the expert named billious here:

http://www.experts-exchange.com/Operating_Systems/MSDOS/Q_20665341.html

He parses the results of the "ver" command to identify the OS.
0
 

Assisted Solution

by:jzanette
jzanette earned 125 total points
ID: 10843677
A more straightforward and self-documenting solution would be to use the FREE Advance NT/2K/XP/K3 Command Library, which provides commands like:

   %.ifNT% (
      [NT Commands Here]
   ELSE
      [2000 or above commands here]
   )


*******
For more information and color-keyed examples:

   (http://TheSystemGuard.com/MtCmds/IfCondition/ifNT.htm)
   (http://ntlib.com)


     
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 12292005
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
Split between asyscokid and jzanette

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Leew
EE Cleanup Volunteer
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Use Windows Task Scheduler to print a Word document weekly so your printer ink won't dry out.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question