Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

If Exist ?  WinNT vs Win2K

Posted on 2004-04-16
4
Medium Priority
?
149 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 20

Accepted Solution

by:
Dufo G. Belski earned 500 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 500 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 96

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

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…
If you’re involved with your company’s wide area network (WAN), you’ve probably heard about SD-WANs. They’re the “boy wonder” of networking, ostensibly allowing companies to replace expensive MPLS lines with low-cost Internet access. But, are they …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

730 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