Solved

If Exist ?  WinNT vs Win2K

Posted on 2004-04-16
4
145 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

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…
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 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