Create folder using variable as name
#1
Posted 27 December 2007 - 07:32 PM
DriveMapAdd ("y:", "\\DG8BRR11\Deployment Server\rips")
$computername = regread("HKLM\SYSTEM\CONTROLSET001\CONTROL\COMPUTERNAME\COMPUTERNAME" , "COMPUTERNAME")
if not fileexists("y:\rips\$computername") then
dircreate("y:\$computername")
endif
I know I don't have it right as it is actually creating a folder called $computername. What am I missing here?
#2
Posted 27 December 2007 - 07:34 PM
#3
Posted 27 December 2007 - 07:37 PM
$computername cant be in the quotes:It's me again Margret, the noob. I've spent 30 minutes on trying to figure this out and I know it's gotta be simple. I've searched the forums for one like it and cannot come up with anything. What I need to do is create a folder using the varible name.
DriveMapAdd ("y:", "\\DG8BRR11\Deployment Server\rips")
$computername = regread("HKLM\SYSTEM\CONTROLSET001\CONTROL\COMPUTERNAME\COMPUTERNAME" , "COMPUTERNAME")
if not fileexists("y:\rips\$computername") then
dircreate("y:\$computername")
endif
I know I don't have it right as it is actually creating a folder called $computername. What am I missing here?
<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers
#4
Posted 27 December 2007 - 07:38 PM
DriveMapAdd ("y:", "\\DG8BRR11\Deployment Server\rips") If Not fileexists("y:\rips\" & @ComputerName) then DirCreate("y:\" & @ComputerName) EndIf
That is correct syntax. Maybe that is what you are looking for?
- The Kandie Man ;-)
#5
Posted 27 December 2007 - 07:47 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users




