Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Closed Thread
Old 03-30-2011, 05:53 AM opening folder
madseason's Avatar
Experienced Talker

Posts: 35
Trades: 0
Hi, i need help opening a folder in vbscrip in a new windows. Can someone help me?

<A HREF="c:\">exemple</A>.


this is not working. always open the folder from localhost

Last edited by madseason; 03-30-2011 at 07:09 AM..
madseason is offline
View Public Profile
 
 
Register now for full access!
Old 03-30-2011, 08:52 AM Re: opening folder
chrishirst's Avatar
Defies a Status

Posts: 43,970
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
href="c:\ is not a valid location for the HTTP protocol.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 03-30-2011, 09:57 AM Re: opening folder
madseason's Avatar
Experienced Talker

Posts: 35
Trades: 0
How do i go to C:\ then? I can't?

Last edited by madseason; 03-30-2011 at 10:00 AM..
madseason is offline
View Public Profile
 
Old 03-30-2011, 10:12 AM Re: opening folder
chrishirst's Avatar
Defies a Status

Posts: 43,970
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
ASP scripts are limited to accessing folders within the context of the server.

This is a security consideration to prevent directory traversal exploits.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 03-30-2011, 10:36 AM Re: opening folder
madseason's Avatar
Experienced Talker

Posts: 35
Trades: 0
What about this?
Quote:
gopher://<host>:<port>/<gopher-path>
The host indicates the Internet address of the Gopher server, while the port, as in the previous cases, can generally be omitted along with its preceding colon. The gopher-path specifies the type of Gopher resource, a selector string, and perhaps other information. A detailed discussion of Gopher queries is not within the scope of this document, but generally you can determine a document's gopher-path from information provided by your browser.
Example: <A HREF="gopher://ubunix.acsu.buffalo.edu">Gopher at UB</a>
madseason is offline
View Public Profile
 
Old 03-30-2011, 10:44 AM Re: opening folder
chrishirst's Avatar
Defies a Status

Posts: 43,970
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And the gopher URI scheme has what to do with the question?????
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 03-30-2011, 10:54 AM Re: opening folder
madseason's Avatar
Experienced Talker

Posts: 35
Trades: 0
I made a mistake, sorry.

There must be a way?
madseason is offline
View Public Profile
 
Old 03-30-2011, 11:10 AM Re: opening folder
chrishirst's Avatar
Defies a Status

Posts: 43,970
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Not if you wan't to maintain some level of security to your server there isn't.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 03-31-2011, 02:58 AM Re: opening folder
Shey's Avatar
Keeper of the herd

Posts: 1,599
Name: Shey
Location: Behind you, laying my ever corrupting hands upon your shoulders. Soon, you shall be an extension of me.
Trades: 0
Please clarify,

you mean you want to open explorer to the folder?

Shell "explorer YOUR_PATH"

however, to open in VB use the shell object

Code:
Const WINDOW_HANDLE = 0
Const NO_OPTIONS = 0

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder _
    (WINDOW_HANDLE, "Select a folder:", NO_OPTIONS, "C:\Scripts")       
Set objFolderItem = objFolder.Self

objPath = objFolderItem.Path
objPath = Replace(objPath, "\", "\\")

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}\\" & strComputer & "\root\cimv2")

Set colFiles = objWMIService.ExecQuery _
    ("Select * from Win32_Directory where name = '" & objPath & "'")

For Each objFile in colFiles
    Wscript.Echo "Readable: " & objFile.Readable
Next
__________________
RenditionDigital provides Software Development, Games Development, Digital Publishing, Social Media moderation in all flavors-
Please login or register to view this content. Registration is FREE
. What is software engineering? There is a great group of highly skilled tech people
Please login or register to view this content. Registration is FREE
. |Also visit My Blog
Please login or register to view this content. Registration is FREE
Shey is offline
View Public Profile Visit Shey's homepage!
 
Closed Thread     « Reply to opening folder
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.54632 seconds with 11 queries