Sign in to follow this  
Followers 0
brosy

Check if share exists on remote server

2 posts in this topic

I'm just new to autoit so this may be a dumb question but how do i check if a share exists on a remote computer.

for example 1 want to do the following:

1. ping server to verify it exists

2. check share exists on server

3. check folder is present in share on server, if not create it.

4. check if files exist in folder, if not (or if old) then copy the files to folder.

5. execute an application

i wanted to put this into a nice gui with smooth progress bar but got stuck with the share check.

any help would be great.

Share this post


Link to post
Share on other sites



I'm just new to autoit so this may be a dumb question but how do i check if a share exists on a remote computer.

for example 1 want to do the following:

1. ping server to verify it exists

2. check share exists on server

3. check folder is present in share on server, if not create it.

4. check if files exist in folder, if not (or if old) then copy the files to folder.

5. execute an application

i wanted to put this into a nice gui with smooth progress bar but got stuck with the share check.

any help would be great.

Did you try the following?

$RemDir = "\\MyServer\MyShare\MyDir\"
If FileExists($RemDir) Then
     MsgBox(64, "Remote", "Remote directory present at: " & $RemDir)
Else
     MsgBox(64, "Remote", "Remote directory NOT present at: " & $RemDir)
EndIf

I can't test it right now, but I think FileExists() supports UNC paths.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  
Followers 0