Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Path with Spaces

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Path with Spaces
  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 >>
 Path with Spaces - 6/21/2008 8:59:35 AM   
  scorpion13_dt

 

Posts: 6
Score: 0
Joined: 6/18/2008
Status: offline
Hi,
I am facing a problem, with getting refernce of a folder that has spaces in its path. Code is like this

  for each foldr in test_fldr
     set fld = fso.getfolder(test_fldr.path & foldr.name) 
      :
      :
      :
  Next

The problem is that when foldr.name conatain spaces then code return error "Path Not Found". So is there anyway to solve it.
Please help

_____________________________

Sagar Trehan
 
 
Post #: 1
 
 RE: Path with Spaces - 6/21/2008 10:43:41 AM   
  dm_4ever


Posts: 2664
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
If you're looping through folders...why do you need to get the subfolder folder?  What information do you need from it that you simply can't get for it within your for each...next loop?

_____________________________

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 #: 2
 
 RE: Path with Spaces - 6/21/2008 10:08:10 PM   
  scorpion13_dt

 

Posts: 6
Score: 0
Joined: 6/18/2008
Status: offline
Hi,
srry for giving u the partial scenario. Actually I need to compare two folders that are having same path but are in different drives. For e.g. let there are two dirves C: and D:, then I want to compare all the files and folder in both that are having same path(but differ only in drive letter). Now u may think thats a bit rubbish, but actually one of the drive is going to be snapshot( created using Vshadow) of other. So wat I actually wants to do is that loop thru folders of one drive and retrive the same folder that are in other drive. But the problem comes when I try to retrive the folder which is having sapces in its name. I get error "Path not Found". SO is ther way to overcome that.

Regards
Sagar R Trehan


_____________________________

Sagar Trehan

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: Path with Spaces - 6/22/2008 12:04:29 AM   
  scorpion13_dt

 

Posts: 6
Score: 0
Joined: 6/18/2008
Status: offline
Hi,
I found a strange thing. Initially when my program was giving me the error I thought that might be because of the spaces in the path, but I discovered that it is not true. Actually now what is happening is that, whenever I am trying to retrive the size of folder documents and settings, I get error. I think that might be because the size of doucments and setting is 16 GB. So now my question is that is there any upper limit to the size, which size property return in VBscript.

_____________________________

Sagar Trehan

(in reply to dm_4ever)
 
 
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 >> Path with Spaces 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