PC Review Forums Newsgroups Windows 2000 Microsoft Windows 2000 Developer Create folder in vbscript

Reply

Create folder in vbscript

 
Thread Tools Rate Thread
Old 13-03-2009, 02:16 AM   #11
xpyder
Junior Member
 
Join Date: Mar 2009
Posts: 1
Trader Rating: (0)
Default


a much easier way is shown in this function I just made, feel free to use it however you wish

if NOT makeFolder("c:\Program Files\xpto\123\client\") then wscript.echo "problem making folder"

'===============
'makeFolder it creates a folder and it's subfolders
'===============
function makeFolder(byVal pFolder)
makeFolder=FALSE
dim oShell
set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "cmd.exe /c md """ & pFolder & """"
makeFolder=TRUE
end function
xpyder is offline   Reply With Quote
Old 19-08-2009, 01:43 PM   #12
vinay_id2005
New Member
 
Join Date: Aug 2009
Posts: 1
Trader Rating: (0)
Default Create folder using machine name

Hi All,

Can you help me in creating the VBS to create the folder with machine name at the specified location

Machine name=xxxxxx

the folder should be created at c:\demo\machine name

Thanks in advance
vinay_id2005 is offline   Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off