Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Map Drive and Control (http://www.go4expert.com/forums/map-drive-control-t28068/)

Majskamuha 21Mar2012 12:03

Map Drive and Control
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


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

Majskamuha 23Mar2012 17:03

Re: Map Drive and Control
network drive activity - how check this

All times are GMT +5.5. The time now is 02:20.