Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Unix "system " command

Reply
Thread Tools

Unix "system " command

 
 
aki
Guest
Posts: n/a
 
      08-04-2008
Hello ,

i want to use system commnad in my code to delete files in specified
manner.
but this way i am not able to delete files.
Can somebody answer .



i tried with this as following , but not working
string omcid;
string netype ;
string nename ;

//some stuff to get values inside these string variables

cout<<"omcid"<<omcid<<endl; // here i printed the value it
iscoming correct
cout<<"netype"<<netype<<endl;// here also
cout<<"nename"<<nename<<endl; // here also
system( ("rm -f /path/" + omcid + '_' + netype + '_' + nename
+"_*_trans.csv").c_str() ) ;

thanks
aki
 
Reply With Quote
 
 
 
 
santosh
Guest
Posts: n/a
 
      08-04-2008
aki wrote:

<news:comp.lang.c++>
<news:comp.unix.programmer>

 
Reply With Quote
 
 
 
 
aki
Guest
Posts: n/a
 
      08-04-2008
On Aug 4, 5:20 pm, santosh <(E-Mail Removed)> wrote:
> aki wrote:
>
> <news:comp.lang.c++>
> <news:comp.unix.programmer>


it was due to inccorrect path ...
now i is working fine..

thanks
Aki
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Unix shell command $ parse command line arguments in python rkoida@yahoo.com Python 4 04-23-2005 04:42 AM
can I run unix shell command in the ModelSim shell? clinton__bill@hotmail.com VHDL 2 02-18-2005 10:04 PM
compile C programs with UNIX system calls (= Unix Programs??) jrefactors@hotmail.com C Programming 18 01-10-2005 03:35 AM
compile C programs with UNIX system calls (= Unix Programs??) jrefactors@hotmail.com C++ 12 01-10-2005 03:35 AM
my own perl "dos->unix"/"unix->dos" Robert Wallace Perl Misc 7 01-22-2004 10:59 PM



Advertisments