Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Easy But strange Error

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,61689
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Easy But strange Error
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Easy But strange Error - 6/22/2008 12:27:38 AM   
  scorpion13_dt

 

Posts: 6
Score: 0
Joined: 6/18/2008
Status: offline
Hi,
I am new to Vbscript. And I tried my first program and got error in that also.
I jst thought to write a small program that will give me the size of "Documents and Settings" folder. But when I run this program I get error "Path not found". Initailally I thought that it might be because of spaces in the name of folder. But tht's not the case because I tried to run the same code with other folders having spaces in their name and program worked fine. But I am getting error when I run it for "Documents and Settings". So I am really curious to know, wats the problem with "Documents and Settings" folder.

Set fso = createobject("Scripting.FilesystemObject")
Set obj = fso.getfolder("C:\Documents and Settings")
wscript.echo obj.size/(1024*1024)

_____________________________

Sagar Trehan
 
 
Post #: 1
 
 RE: Easy But strange Error - 6/22/2008 12:56:52 AM   
  yfki

 

Posts: 78
Score: 0
Joined: 12/12/2007
Status: offline
try this...


      

(in reply to scorpion13_dt)
 
 
Post #: 2
 
 RE: Easy But strange Error - 6/22/2008 6:24:17 AM   
  dm_4ever


Posts: 2664
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
It shouldn't be an issue...what OS are you using?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to scorpion13_dt)
 
 
Post #: 3
 
 RE: Easy But strange Error - 6/22/2008 6:15:00 PM   
  ninjamaster

 

Posts: 107
Score: 0
Joined: 1/23/2007
Status: offline
A rights issue?

As the documents and settings folder contains the folders for all users on the system (including local admin) then the script should be ran by a user with admin rights.

(in reply to scorpion13_dt)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Easy But strange Error Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts