Questions tagged [findfirst]

45 questions
16
votes
2 answers

Why does FindFirst return file names that don't match the mask?

I pass the parameter value '*1.dat' to FindFirst, still the first file that the FindFirst() routine return is 46checks5.dat, very consistently. Is this a known problem? vpath:=trim(vpath); result:=true; try …
Blow ThemUp
  • 815
  • 5
  • 16
  • 28
7
votes
1 answer

Delphi Rio fails to read external storage with READ_EXTERNAL_STORAGE permissions set

I have a project that I once created in Delphi Seattle and I would now like to move to Delphi Rio. I read the directory structure on an external SD-Card using findfirst/findnext i := findfirst(datadir + '*', faanyfile, ts); datadir variable…
Andre Ruebel
  • 431
  • 3
  • 10
5
votes
10 answers

How to optimize $.find().first()?

I need to retrieve the first element. I do that with this code... $(element).find('.x').first(); As much as I understand, that code... Retrieves all elements from element that matched .x, Removes unneeded elements; Is there any better way to do…
daGrevis
  • 19,600
  • 35
  • 95
  • 134
3
votes
1 answer

FindFirstFile causes "There is no disc in the drive" Error

FindFirstFile function is causing "There is no disc in the drive. Please insert a disc into drive" Error. The cause of this error is that there is no sd-card in the USB stick and it's empty. My problem is that I have to scan all the drives for a…
Farooq Zaman
  • 435
  • 1
  • 6
  • 19
3
votes
5 answers

How do I find the first occurrence of a vowel and move it behind the original word (pig latin)?

I need to find the first vowel of a string in python, and I'm a beginner. I'm instructed to move the characters before the first vowel to the end of the word and add '-ay'. For example "big" becomes "ig-bay" and "string" becomes "ing-stray"…
markiv189
  • 151
  • 2
  • 9
3
votes
1 answer

FindFirst returns folders in English - Delphi

Good morning ... I am listing all files in a directory ... But I am facing the following problem ... When folders are coming All in English ... But the operating system is Ministry of Defence for the Portuguese ... How to list it according to the …
abcd
  • 427
  • 6
  • 22
3
votes
1 answer

Search multiple fields access using findfirst criteria in VBA

The following code is populating values on a form after it finds a match in a Mobile phone records table, in the criteria, how can I search for the value in 2 different fields? I could replace the combo box with a text box and would like to search…
user1687929
  • 133
  • 2
  • 2
  • 12
3
votes
2 answers

jQuery. Function to find first div containing invalid fields

I have a form divided into three tabs and validate it with jQuery validation plugin. User can switch between tabs with links. After submit button is pushed and validation failed, error class is being added to links which corresponding…
Mitya Ustinov
  • 873
  • 3
  • 11
  • 16
2
votes
3 answers

Delphi search for files in a thread

Got this pretty straight forward function to search for files: function FindFiles(const Path, Mask: string; IncludeSubDir: boolean): integer; var FindResult: integer; SearchRec: TSearchRec; begin Result := 0; FindResult := FindFirst(Path +…
user645976
2
votes
1 answer

VBA: type mismatch in rs.findfirst

I have this code: Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("tblJobs", dbOpenDynaset) rs.FindFirst "EmpNo=" & "'cbEmpNo.Value'" & " And " & "JobNo=" & "'cbJobNo.Value'" and I've been getting type mismatch (removing the ' doesn't…
Igal Klebanov
  • 208
  • 1
  • 14
2
votes
2 answers

Unexpected behaviour with .FindFirst VBA MS Access function: .NoMatch always returns true

View the following lines of code below. Dim rst As DAO.Recordset Dim strSql As String strSql = "SELECT * FROM MachineSettingsT;" Set rst = DBEngine(0)(0).OpenRecordset(strSql) rst.FindFirst "Microwave = " & "'" & Me.Microwave & "'" & " AND…
jaromey
  • 616
  • 2
  • 10
  • 24
2
votes
3 answers

FindFirst, FindNext (Delphi Xe, Win7) rank is not correct

I have some files in a directory. I try get these files with FindFirst and FindNext but I can't get same order on Windows 7.…
Ali Cetinturk
  • 79
  • 1
  • 10
1
vote
2 answers

NSIS Find all .txt files

I currently have a check to find all text files in $INSTDIR, shown below. However, there could potentially be subdirectories, such as $INSTDIR\mySub, which contains additional .txt files. Is there a way to keep a similar loop structure but search…
jkh
  • 3,380
  • 8
  • 33
  • 58
1
vote
1 answer

std::string::find_first_of does not return the expected value

I am trying to create an XML parser in C++. I am currently using cygwin and gcc to compile and gdb to debug. I have this piece of code: const size_t mDataSize = mData.size(); ... size_t ltPos = mData.find_first_of('<', pos); if…
Charlie
  • 152
  • 11
1
vote
1 answer

Error with Access VBA Recordset to Find First on a Different Form?

I created a pop-up form in access, to search for a record and go to it on the main entry form. The pop-up "find" form has a listbox with all the records that are in the main entry form, and the first column of that listbox is the ID on the main…
missscripty
  • 509
  • 1
  • 10
  • 26
1
2 3