Jump to content
Sign in to follow this  
placebo

open directory

Recommended Posts

placebo

hi,

i'm writing my first script and I have a problem.

I can't found the function which allow me to open a specific drive (for example: "o:\") so the user can explore the o-drive

can somebody help me?

by,

filip

Edited by filipvds

Share this post


Link to post
Share on other sites
TheCreator

Hello,

What do you mean open a specific drive? You can change to it, list it's contents, etc etc, but you don't need to open it. This isn't c#/c++ etc where you have to have handles to heverything.


~~TheCreator~~Visit http://tysdomain.com for personal software and website solutions.

Share this post


Link to post
Share on other sites
TheCreator

ShellExecute("explorer.exe", "C:\")

I really don't think that was what he wanted.


~~TheCreator~~Visit http://tysdomain.com for personal software and website solutions.

Share this post


Link to post
Share on other sites
placebo

the script checks if the drive map "o:\" is active. If not, it will map \\servername\data to "o:\"

at last i want to open o-drive, so the user doesn't have to go to "my computer > o >"

Share this post


Link to post
Share on other sites
TheCreator

lunch break just ended. so I can't dive into this, but there are functions to see if the drive exists


~~TheCreator~~Visit http://tysdomain.com for personal software and website solutions.

Share this post


Link to post
Share on other sites
placebo

hi,

i have a solution. This is my full script and it's the result i wanted:

$var = DriveStatus( "o:\" )
if ($var = 'INVALID') Then
    DriveMapAdd ( "o:", "\\server\data$")
    $var = DriveStatus( "o:\" )
    if ($var = 'INVALID') THEN
        msgbox(0, "Error", "Not possible to create the o-drive! Check your network settings!", "");
    Else
        ShellExecute("explorer.exe", "o:\")
    endif 
else
    ShellExecute("explorer.exe", "o:\")
endIf

btw: i didn't see the other reply's. You were to fast for me :-)

thanks!

Edited by filipvds

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.