Map Drive and Control

Discussion in 'Visual Basic ( VB )' started by Majskamuha, Mar 21, 2012.

  1. Majskamuha

    Majskamuha New Member

    Joined:
    Mar 21, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi, I am pretty new at this formu. So first of all to say hello. And also sorry for my English.

    I have one question about VB. I made one program to map network drives with password and user name, actuality they are CNC machines. Everything works Ok, but I would like to know if there is any possibility to make some VB app that will show me is this CNC is working or it is in stop mode. Software on CNC is based on windows nt system. He reds NC programs stored on machine, that was copied on machine fom pc.


    Any idea how to develop something like that.

    Any idea how to check if someone is reading file on remote disk?

    ok so far i have something, with vb script, just for testing. but problem is that I can only check one file, but not all files in folder folder


    Code:
    sLogFile = "L:\Razno\Vrijeme\"   Set oFSO = CreateObject("Scripting.FileSystemObject")   bUpdFinished = False  On Error Resume Next        Set f = oFSO.OpenTextFile(sLogFile, ForAppending, True)       If Err.Number = 70 Then           'Ako je prostup zabranjen( on Croatian)          ' Pricekaj pola sekunde( on Croatian)          WScript.Echo "u radu"           WScript.Sleep 500         'provjeri i samo nastavi dalje( on Croatian)      ElseIf Err.Number <> 0 then           WScript.Echo  "u radu" & Err.Number           bUpdFinished = True       Else          'ako radi izbaci 		WScript.Echo "ne radi"          bUpdFinished = True       End If
    so if i put for example sLogFile = "L:\Razno\Vrijeme\test.xls" for this particular file works fine, but how can I do that for all file in folder.


    Also one more question
    can it be don???
    Input box - to input several files by user and than check them by code above

    please helo
     
  2. Majskamuha

    Majskamuha New Member

    Joined:
    Mar 21, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    network drive activity - how check this
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice