ISI360 Posted April 18, 2018 Share Posted April 18, 2018 (edited) Hi! I have found a very very strange behavior with FileFindNextFile and AutoIt v. 3.3.14.5: At first my example script (adapted from help file): ;test.au3 #include <MsgBoxConstants.au3> Example() Func Example() ; Assign a Local variable the search handle of all files in the current directory. Local $hSearch = FileFindFirstFile("C:\Some Tests\Profildaten Backup\Desktop\Yi\uskin\Skins\Default\*.*") ; Check if the search was successful, if not display a message and return False. If $hSearch = -1 Then MsgBox($MB_SYSTEMMODAL, "", "Error: No files/directories matched the search pattern.") Return False EndIf ; Assign a Local variable the empty string which will contain the files names found. Local $sFileName = "", $iResult = 0 While 1 $sFileName = FileFindNextFile($hSearch) ; If there is no more file matching the search. If @error Then ExitLoop ; Display the file name. ConsoleWrite($sFileName&@crlf) WEnd ; Close the search handle. FileClose($hSearch) EndFunc ;==>Example You can see, the script should output all Files in a path. Should be simple, right? The ConsoleWrite Output looks like this: -.bmp bc_new.bmp bf_new2.bmp So all fine! Sooo....now i put the exact same folder on a network drive. Let it be drive S: for example (effect is the same as with \\SERVERNAME\SHARE....) Then the output looks like this: -.bmp . .. bc_new.bmp bf_new2.bmp Where doese "." and ".." come from?! I really have no idea what is happening here ^^ Could this be an AutoIt bug? (Or just my stupid Win10 -.-) Thanks for your help in advance!! PS: I attached you a .zip with the testfiles. So you have the same enviroment for testings. Files.zip Edited April 18, 2018 by ISI360 Link to comment Share on other sites More sharing options...
ISI360 Posted April 19, 2018 Author Share Posted April 19, 2018 (edited) I just want you to know that i think it´s really my windows 10 pc what´s going crazy here... (Or has somebody testes this and has the same problems like me?) I tested it today on my work pc (also win 10) and it is working fine here! (And other win7 machines too) So i think it is time to finally reinstall windows new on my home computer Edited April 19, 2018 by ISI360 Link to comment Share on other sites More sharing options...
Simpel Posted April 19, 2018 Share Posted April 19, 2018 Hi. Working with php on a server you'll find . and .. too. I guess it's not unusual at all. Conrad SciTE4AutoIt = 3.7.3.0 AutoIt = 3.3.14.2 AutoItX64 = 0 OS = Win_10 Build = 19044 OSArch = X64 Language = 0407/german H:\...\AutoIt3\SciTE H:\...\AutoIt3 H:\...\AutoIt3\Include (H:\ = Network Drive) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. Link to comment Share on other sites More sharing options...
UEZ Posted April 19, 2018 Share Posted April 19, 2018 @ISI360: on C drive I get the same results. When I put the files from the Zip file to my network drive with the drive letter L I get the same result but the order is different but "." or ".." chars. Output for L drive: bf_new2.bmp -.bmp bc_new.bmp Tested on Win10 x64 and AutoIt v3.3.14.5 / 3.3.15.1. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 19, 2018 Moderators Share Posted April 19, 2018 ISI360, I once ran into a user with what seems a very similar problem - see this post and subsequent - which appeared to be caused by the fact that the server was using a different OS and transferring the FileFindFolder return to Windows meant that we got the additional . and .. items. Could this be the case here? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Bowmore Posted April 19, 2018 Share Posted April 19, 2018 A single dot is the current directory a double dot is the parent directory If you do a Dir from the command prompt you will see that these are always the first 2 listed. They are mostly used for specifying paths relative to the current directory. Earthshine 1 "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
ISI360 Posted April 20, 2018 Author Share Posted April 20, 2018 (edited) Thanks for the infos guys! Yeah the strange thing is i never had this before on any system. Its the first time for me i got "." or ".." returned by FileFindNextFile. And @Melba23 the target system (server) in this case is a Windows Server 2016...so they SHOULD be making the same...in theory ^^ But meanwhile i have accepted this as a "strange thing". And it can easily filtered by parsing the results. Maybe its gone when i reinstall my pc. Edited April 20, 2018 by ISI360 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now