6 posts in this topic
I'm having troubles with FileExist function.
My autoit version is 18.104.22.168.
I'm working with C:\windows\System32 folder.
On windows 7
I use this script copied and modified from FileExist.au3 from the Autoit Help chm
#include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> Example() Func Example() ; Create a constant variable in Local scope of the filepath that will be read/written to. Local $sFilePath = "C:\windows\System32\PrintBrmUi.exe" ; Then try with : C:\windows\System32\printui.exe Local $sFileVersion = FileGetVersion($sFilePath, $FV_PRODUCTNAME) ;Local $iFileExists = FileExists($sFilePath) ; Display a message of whether the file exists or not. If FileExists($sFilePath) Then MsgBox($MB_SYSTEMMODAL, "", "The file " & $sFilePath & " exists. " & @CRLF & $sFileVersion) Else MsgBox($MB_SYSTEMMODAL, "", "The file " & $sFilePath & " doesn't exist." & @CRLF & $sFileVersion) EndIf EndFunc ;==>Example if the productname of the file doesn't have key words like Windows or Microsoft
it say that the file do not exist...
Try it it!
Send me your feedbacks
Hello, again ...
Ive been working a lot on a script lately .. unfortunately I just.. cannot figure to get it to work ( im no coder.. )
I start a new thread , cause the old one isoutdated, the code, have changed a lot since its creation
1 - I need to search for every files with specific extensions on C:\ G:\ H:\ drive and get their filesize. ---- Solved Using UDF _DirGetSizeEx
2- Output everything to log --- Solved too
3- Proceed to copy IF for drive G: ( another function ) @username match file ownership --- Not yet figured out..
Tried that.. no succes so far... and im sure its pretty obvious why but once again, cant figure it out . . ( it is only a TEST' not the actual code.. )
4- If ownership match, proceed to copy, to $storage, If upon copy FileExist, rename to $sFilename_1."extension of the file" --- having trouble here too ...
heres the code..
Thank you ...
btw. its really important for me, it for a Notes Migration of 1740 users... I dont want to do it by hand.. not, at all!