batch file - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 12-13-2006, 06:38 PM   #1 (permalink)
Monster Techie
 
Join Date: Dec 2003
Posts: 1,084
Send a message via Yahoo to IBMan
Default batch file

I want to set a variable based on what another line starts with

basically i want the batch file to ask for a specified user name(i'd be using the set command in windows xp)

basically what i want it to do is take my input say...

7lastnamefirstinitial

then the next part would be

Code:
if username begins with X then create user's home directory in \\server\homedir\200X" both X's referring to the same thing of course
thanks for any help

if this is confusing for anyone let me know and i'll try to explain
__________________

__________________
Server:
AMD Athlon 4000+ @ 2.4 GHz
4096 MB RAM
40 GB HDD
Dual Mirrored 500 GB HDDs
DVD-ROM Drive
Windows Server 2003 x64 R2 SP2
IBMan is offline  
Old 12-14-2006, 01:40 AM   #2 (permalink)
Master Techie
 
Join Date: Feb 2004
Posts: 2,172
Send a message via AIM to Win2kpatcher
Default

More explination please Could this not be achieved with group policies folder redirection?
__________________

Win2kpatcher is offline  
Old 12-14-2006, 08:20 PM   #3 (permalink)
Monster Techie
 
Join Date: Dec 2003
Posts: 1,084
Send a message via Yahoo to IBMan
Default

like if i were to create a batch file"

Code:
net user /add 7%lastname%%firstinitial% %Password% home:\\fs1\homedir\"200%first character of username%\%username%
essentially being

Code:
net user /add 7lastnamef /12345678 /home:\\fs1\homedir\2007\7lastnamdf
__________________
Server:
AMD Athlon 4000+ @ 2.4 GHz
4096 MB RAM
40 GB HDD
Dual Mirrored 500 GB HDDs
DVD-ROM Drive
Windows Server 2003 x64 R2 SP2
IBMan is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 04:15 PM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.