how to call dos command in C/fortran?

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2005
Posts: 2
Reputation: pplqingshi007 is an unknown quantity at this point 
Solved Threads: 0
pplqingshi007 pplqingshi007 is offline Offline
Newbie Poster

how to call dos command in C/fortran?

 
0
  #1
Dec 2nd, 2005
I want to call a dos command, such as "dir/B *.txt >>a.txt", how can I realize it in C or Fortran code?
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,343
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 237
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: how to call dos command in C/fortran?

 
0
  #2
Dec 2nd, 2005
system("dir/B *.txt >>a.txt");
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 2
Reputation: pplqingshi007 is an unknown quantity at this point 
Solved Threads: 0
pplqingshi007 pplqingshi007 is offline Offline
Newbie Poster

Re: how to call dos command in C/fortran?

 
0
  #3
Dec 2nd, 2005
Thank you very much, Is there a way in Fortran compile environment?
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 251
Reputation: dwks has a spectacular aura about dwks has a spectacular aura about 
Solved Threads: 25
dwks's Avatar
dwks dwks is offline Offline
Posting Whiz in Training

Re: how to call dos command in C/fortran?

 
0
  #4
Dec 3rd, 2005
Whatever the Fortran equivalent of system() is. This is the C/C++ forum, not Fortran.
dwk

Seek and ye shall find.

"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.

"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison

"The only real mistake is the one from which we learn nothing."
-- John Powell
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC