Webmaster Forum

Go Back   Webmaster Forum > Scripting/Programming & Debugging > ASP & VBScript Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

ASP & VBScript Forum Need help from a webmaster with ASP or VBScript, you may ask in this forum?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-03-2008, 01:08 PM
lazydev lazydev is offline
Junior Member
 
Join Date: Apr 2008
Posts: 1
lazydev is an unknown quantity at this point
Submit to Clesto Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq Submit to Spurl
Default get folders

The line coloured in pink is throwing errors

just help me.


strRoot="D:\Archive"

Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objFolder=objFSO.GetFolder(strRoot)
Set colFolders=objFolder.SubFolders

strFolder = InputBox("Please Enter a FolderName.")

If objFSO.FolderExists(strRoot & strFolder) Then
WScript.Echo "Folder " & strRoot & strFolder &_
" already exists"
Else
colFolders.Add strFolder
End If
Wscript.Echo " " & strRoot & "" 'D:\Archive
Wscript.Echo " " & strFolder & "" 'search
Set objFolder=objFSO.GetFolder(strRoot &strFolder)
Wscript.Echo " " & objFolder & " " 'run time error path not found
Set colFolders=objFolder.SubFolders
arrFolders=Array("Subfolder 1","Subfolder2","Subfolder3")

For Each item In arrFolders
If objFSO.FolderExists(strRoot & strFolder & "\" & item) Then
WScript.Echo "Folder " & strRoot & strFolder &_
"\" & item & " already exists"
Else
colFolders.Add item
End If
Next
Reply With Quote

This ad is part of our Revenue Sharing program
Reply


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

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



All times are GMT. The time now is 04:25 AM.


Creative Commons License
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30