Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
get the current folder name in var
Name: dudecybetron Date: February 24, 2004 at 08:01:03 Pacific OS: win xp CPU/Ram: 128 mb
Comment:
hi,
assume that am in the following directory.
c:\fol1\fol2\fol3
now i need a bat script that stores the current directory "fol3" in a variable.i dont want the full path.i just need the current directory in a variable.
Name: IVO Date: February 24, 2004 at 08:57:29 Pacific
Reply:
As you are running under Windows XP the current directory is found in the CD variable so to set your own one
Set MyCurDir=%CD%
0
Response Number 2
Name: dudecybetron Date: February 24, 2004 at 09:20:07 Pacific
Reply:
hi,
u c fellow i know that method.assume that am in c:\fol1\fol2\fol3. now if i use set mycurdir=%cd% and view that enivironment variable then what is stored in mycurdir is mycurdir=c:\fol1\fol2\fol3. i dont want this. i just want it to tell as "fol3". (ie) mycurdir=fol3
is there a way for this?
0
Response Number 3
Name: Wengier Date: February 24, 2004 at 12:35:05 Pacific
Summary: I would like to be able to retreive either the computer name or current user name in a batch program using windows 98. I can easily do this in windows 2000. ...
Summary: I think you guys misread this question--I think what he is asking is how to get the WINDOWS number while in DOS so he can reinstall WINDOWS I'm guessing the thing wont open WINDOWS and all he has op...