Solved

If Exist ?  WinNT vs Win2K

Posted on 2004-04-16
4
143 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

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…
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now