It is necessary to execute a command like
dir C:\*.txt /b/s >> D:\1.txt
that is, search for files by mask and save the results to the file 1.txt on disk D.
I tried through system()
and ShelExecute
, nothing happened. Can anyone help? Maybe there is another way, other than running a DOS command?
It is important that after launching nothing pops up, that is, the program silently performs the search and writes the results to a file.