Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'd like to program a batch scipt for all Windows OS.
Does anyone now, which OS understands which of this variables. On XP both are set to "Systemdriveletter:\Windows"
blackrat
Backup Incremental in WoW-Section
Batch to full, incremental or differential backup of folders, validation and achiving RAR

Hi,
I don't quite understand your second paragraph. But.
In my fairly regular w2k installation both are set to:
C:\WINNT
Dunno about DOS based windows vis-a-vis those variables. Somebody here will know.
You can make scripts which will pretty much work in either.
If a script relies on a 'command extension' which is available to it in NT, it will fail in DOS.
One example which comes to mind is that DOS does not have a built in %TIME% so if your script needs this you will need to set %TIME%
A handy way for your script to 'know' is:
if %OS%!==!
if %OS%!==Windows_NT!On the general subject of TIME & DATE, keep in mind that the layouts of TIME & DATE will vary widely [and wildly] according to region & and user prefs. Not to mention non-English or two byte chars.
M2

Thanks, for date and time there is a prgraom called XSET, to solve this problem on 95/98/ME.
So is ther any difference between %windir% and %systemroot%?
Perhaps on 95/98/Me or NT?blackrat
Backup Incremental in WoW-Section
Batch to full, incremental or differential backup of folders, validation and achiving RAR

Hi,
Still dunno about %windir%.
Yeah, there are plenty of 3rd party batch enhancers.
The challenge is to get stuff done using only the standard loadout of OS tools. Critical if you intend to distribute the BAT.
M2

i would have thought that %windir% = c:\windows or c:\winnt for win 2K and win NT
and %systemroot% = c:\windows\system or c:\winnt\system for win 2K and win NT
but actually they mean the same thing
%windir% = c:\windows\ or c:\winnt
%systemroot% = c:\windows\ or c:\winnt
therefore %windir% = %systemroot%not much help though was it but to answere you first question i dont know you could set a "if exist" if needed
MR Admin hear to help

![]() |
![]() |
![]() |

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