Search the Community
Showing results for tags 'fileexists'.
-
Hi all, I want to check if a file exists under the System32 folder: C:\Windows\System32\inetsrv\rewrite.dll The following code always worked for me: $string = @SystemDir & "\inetsrv\rewrite.dll" ConsoleWrite(FileExists($string)) But yesterday I updated my Windows 10 with the last "big" update and now my @SystemDir returns the following string: C:\Windows\SysWOW64 And before it was: C:\Windows\System32 So I thought I change my code to: $string = @WindowsDir & "\System32\inetsrv\rewrite.dll" ConsoleWrite(FileExists($string))But this code also does not work. I tried
-
Have the following code snippet: If not FileExists($ExchangeDir & $StockCSV) Then _FileWriteFromArray($ExchangeDir & $StockCSV, $YahooStockEntries) Else When trying to do a check against the non-existent file 'PRN.csv', FileExists is evaluating as True. This is not happening with other file names, directory structure is correct. Any ideas? Thanks Chip
-
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
-
- fileexists
- timeout
-
(and 1 more)
Tagged with:
-
Prior to posting this question, I have experimented with using FileExists, InetGetInfo and InetGet/InetClose functions to test downloading files into my application folder, in case if my file did not already exist. In my case, I was able to pinpoint to a very specific web address, eg.) https://dropbox.com, etc. and then check/download the file. Now my question is, instead of checking from a hardcoded URL, is it possible to: 1. Do a check against the IP address of a remote computer, eg.) my friend's or colleague's desktop computer 2. After checking the IP address if valid and can be conne
- 5 replies
-
- FileExists
- DllCall
-
(and 4 more)
Tagged with:
-
FileExists returns a false negative if the path string is quoted. Windows sometimes uses these quotes to distinguish between path and argument parts of a path string. Thus a path variable pulled from the registry must have the quotes stripped or FileExists gives a false negative. The dos exist command, comspec and the FileOpenDialog, with the "File Must Exist" flag set, also allows these quotes. Fixing this could also provide a method of extend the utility of FileExists and FileOpenDialog's "File Must Exist" flag without breaking any existing scripts. If FileExists optionally allowed these
-
Why is it that if you send the function FileExists with a path that has quotes around it, for example see below, it tells you that the file/path doesn't exist? $drive = """C:""" ;$drive = "C:" Doesn't work ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $drive = ' & $drive & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console If FileExists($drive) Then MsgBox(4096, $drive & " Dir ", "Exists") Else MsgBox(4096, $drive & " Dir ", "Does NOT exists") EndIf $drive1 = "C:" ; $drive1 = C: Works ConsoleWrite('@@ Debug(' & @ScriptLineNumber
-
So I am running a couple of computers on a local network. I am attempting to use FileExists to trigger events on an Autoit program running on each of them. Computer A makes a file (text1.txt) in a shared directory. Meanwhile, Computer B is running a tight loop with FileExists, checking for that file in a mapped drive: While $file1 = 0 $file1 = FileExists("Z:text1.txt") sleep(5000) WEnd However, when I put in some tracking (ConsoleWrite) things, it appears that it is only checking the Z: directory one time, and even when there is the 'text1.txt' file there after a couple of loops, i