Search the Community
Showing results for tags 'unc'.
Hi All, I went searching for something to speed up checking for files on the network (UNC Paths) Most examples were rather complicated but someones multi-threaded solution gave me an idea. Hope it is useful to someone. Seems to work well so far. Func _FileExistsTimeout($sPath, $iTimeout = 1000) Local $hTimer = TimerInit() ; Begin the timer and store the handle in a variable. Local $iPID = Run(@AutoItExe & ' /AutoIt3ExecuteLine "ConsoleWriteError(FileExists(""' & $sPath & '""))"', @ScriptDir, @SW_HIDE, $STDERR_CHILD) Local $sOutput = "" Local $iDiff = 0 While $iDi
This is a very simple application to backup a list of your local and network printers to a shared resource. when you restore the printers, the app will just install the printers that were networked. Feel free to improve upon and use. Let me know what you think I have many more applications and I may post more later. #include <File.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $Backpath = "\\Myawesomeserver\useraccounts" Global $fp = ($Backpath & @UserName) #Region ### START Koda GUI section #
Hi, I'm writing a script to copy a number of files from UNC paths. That bit is pretty simple. However, my users think my script has crashed, which it hasn't, it's only because the UNC path doesn't exist and one of the AutoIt functions is waiting. This is true of FileExists(), FileCopy(), DriveStatus(), etc. Is there a function to check if a UNC path exists that doesn't pause in this fashion? The only way round it, that I can think of at the moment, is to spawn another process and pre-check all the UNC paths and write if they exist in a text file. Then rather than use FileExists(), I u