I want to call a dos command, such as "dir/B *.txt >>a.txt", how can I realize it in C or Fortran code?

Thank you very much, Is there a way in Fortran compile environment?

Whatever the Fortran equivalent of system() is. :) This is the C/C++ forum, not Fortran.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.