good day,
i have a batch file that uses the computer name(s) in various locations. instead of making changes to the batch file, what i want to do is set the computer name as a variable everytime the batch is run and that variable is used for the vpn, folder, etc.
there are various dos commands that get the name and other details, but is there one that gets just the computer name so that i can set it as a variable...
ex.
set folder=%date:~0,3% (sets the folder as Mon)
xcopy "c:\..." "h:\%folder%\ (copys to destination folder Mon)
what i am trying to do is get the computer name (A300SE) only as a variable like the folder is set to a date. then that variable would be used as a login for the vpn and other locations in the batch.
any suggestions.
jat