Questions tagged [findfirst]
55 questions
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,618
- 8
- 38
- 66
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
- 1
- 12
1
vote
1 answer
C++ How to _wfindfirst and _wfindclose on Win64 Win32
I have a piece of code to run on Windows that uses char const for a filename:
char const * filename
_finddata_t fi;
intptr_t n;
if ((n = _findfirst(filename, &fi)) != -1) {
_findclose(n);
return TRUE;
}
Now I want this to use this code…

user3443063
- 1,455
- 4
- 23
- 37
1
vote
1 answer
Incrementing counter in Stream findfirst Java 8
There is a raw text stored in an ArrayList. To clean away unwanted lines from the top, I need to find the index of a string containing a certain tag.
The tag is not a complete String, only a substring. This means I cannot use…

Rob G
- 123
- 3
- 15
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
- 529
- 2
- 11
- 30
1
vote
2 answers
C++ _findfirst and TCHAR
I've been given the following code:
int _tmain(int argc, _TCHAR* argv[]) {
_finddata_t dirEntry;
intptr_t dirHandle;
dirHandle = _findfirst("C:/*", &dirEntry);
int res = (int)dirHandle;
while(res != -1) {
cout <<…

Arrrow
- 542
- 5
- 21
1
vote
0 answers
Understanding _findfirst and _findnext
Need to understand how _findfirst and _findnext works with pattern inputs.
I used to following code to analyze their functionality but the results confuse me.
intptr_t handle;
struct _finddata_t fblock;
int count = 1;
char pattern[]…

acid_srvnn
- 693
- 8
- 15
1
vote
1 answer
ASSEMBLY DTA file attributes, size, name etc
I'm working with assembly for a school project and my assigments in few words requires to find files that match the given extension (*.txt, *.exe etc) and print out that file's size, date, file name etc. So far I've managed to successfully find…

Aivaras
- 23
- 4
1
vote
2 answers
Incompatible types: Card cannot be converted to java.lang.String
I keep getting this error with my code. I can't seem to find the problem.
I'm not sure what to do because I even looked in the text book and it gives me a similar method except with different variables.
I'm on BlueJ.
public int…

Stecler
- 11
- 1
- 1
- 4
1
vote
1 answer
How can I translate VB6 Recordset.FindFirst to C# while using an Access Database?
I'm working on a project where I'm converting an old VB6 project to .NET/C#. I've come upon a method that performs several queries, once of which uses the recordset.FindFirst method to generate sub-results. I'm at a loss on how to translate this…

K997
- 429
- 6
- 19
1
vote
2 answers
Howto quickly gather file list with path and size information?
FindFirst/FindNext is slow. I see program like Defraggler can gather this list quickly. What Windows API they use ?

randadinata
- 21
- 1
0
votes
2 answers
Cannot see/execute "c:\windows\system32\rdpclip.exe" from Delphi code, but can see it and execute it using the same user login in File Explorer
I am trying to execute c:\windows\system32\rdpclip.exe from my Delphi program (Delphi CE 10.4) on Windows 10.
I can see and execute this file just fine from Windows Explorer or from a CMD window, but when I try to use…

Vlad
- 3
- 3
0
votes
2 answers
Get the index of the first element in an array that meets the specified condition
For example, I have an array data = 0 0 0 0 0 0 1 1 1. I want to get the index of the first non-zero element in the array.

winnie
- 183
- 1
- 6
0
votes
1 answer
Looking for c++ equivalent for _wfindfirst for char16_t
I have filenames using char16_t characters:
char16_t Text[2560] = u"ThisIsTheFileName.txt";
char16_t const* Filename = Text;
How can I check if the file exists already? I know that I can do so for wchar_t using _wfindfirst(). But I need char16_t…

user3443063
- 1,455
- 4
- 23
- 37