filehandling
-
in the name of allah hello i want to find all the files name in a directory and then delete all the files that are copies : a.txt a(copy).txt: a(copy).txt must be deleted. how i can find the name of files with c++ commands and how i can delete them . also my os is linux if it is relative to os.i dont know that if i write in a correct thread? valhamdolelah.
-
in the name of allah hello i want to find all the files name in a directory and then delete all the files that are copies : a.txt a(copy).txt: a(copy).txt must be deleted. how i can find the name of files with c++ commands and how i can delete them . also my os is linux if it is relative to os.i dont know that if i write in a correct thread? valhamdolelah.
You can use SHFileOperation[^] with the
FO_DELETE
function and specifying a wild card like*(copy).*
. Is it enough that you determine that the file is a copy with the filename? I could create a new file with the namea(copy).txt
even though it would be a rare occurrence.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)