954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to call dos command in C/fortran?

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

pplqingshi007
Newbie Poster
2 posts since Dec 2005
Reputation Points: 10
Solved Threads: 0
 
system("dir/B *.txt >>a.txt");
Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

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

pplqingshi007
Newbie Poster
2 posts since Dec 2005
Reputation Points: 10
Solved Threads: 0
 

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

dwks
Posting Whiz in Training
269 posts since Nov 2005
Reputation Points: 185
Solved Threads: 28
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You