HERE IS MY PROBLEM
I'm interested in a function that opens for editing, then saves and closes in turn all the files in C:\DIRECTORY\
WHY THAT PROBLEM
The C:\DIRECTORY\ contains text files *.txt whose content should undergo some changes (that pertains to ALL THE FILES IN C:\DIRECTORY\). So I should open each file, edit, save and then close it. Everything is clear to me when dealing with concrete files but I have no idea of how to go through the unknown list of files in C:\DIRECTORY\.
Thanks in advance for any hint!
Jump to Post
The functions FindFirstFile() and FindNextFile() will iterate the all the files and sub-directories. For each file they return a structure that contains the filename, attributes, size and other data. Check the file's attributes to see that it is a normal file and, if it is, your program can open and …
Jump to Post
Thanks Ancient Dragon for your answer. As for FindFirstFile() and FindNextFile(), could you please tell me which C++ library should be included in order for the two functions to be available? I was not able to find them in C++ Builder but that doesn't mean they do not exist at …
All 5 RepliesReply to this topic
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.