Run File - magical mystery language

This is a discussion on Run File - magical mystery language within the Tech Board forums, part of the Community Boards category; Hi, I am very new to C programming, so apologies. I am using Windows NT. I have a programme that ...

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    5

    Run File - magical mystery language

    Hi, I am very new to C programming, so apologies.

    I am using Windows NT. I have a programme that creates aresults txt file from a measuring machine. I have a .bat file that I store on the C drive which copies each file to the network, firstly renaming it. The issue is that I have to manually execute the .bat file each time. I would like it to run in the background.

    Could someone help me with the code that at the end of my current programme will force the .bat file to run?

    File name is: MEA.bat

    Many thanks

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    system( "me.bat" );


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    5
    Thanks for the reply - I couldn't get it to work - came up with an error, so i've attached the actual code - sorry should have done that in the first place to explain it clearly
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    What programming language is that? Looks like Pascal or Delphi.

  5. #5
    Registered User
    Join Date
    Jul 2010
    Posts
    5
    I'm not sure - I'm really new to this, so just trying to alter the original code to do what I need

  6. #6
    Registered User
    Join Date
    May 2010
    Location
    Naypyidaw
    Posts
    1,314
    How is it related to C programming?

  7. #7
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,489
    Not C, so moved.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  8. #8
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    Quote Originally Posted by wilds View Post
    i'm not sure - i'm really new to this, so just trying to alter the original code to do what i need
    lol.
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  9. #9
    Registered User
    Join Date
    Jul 2010
    Posts
    5
    So nobody knows then???

  10. #10
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    On a Windows system, Google for "Scheduled Tasks", and check your "help" topics, also. On Linux, for "Cron jobs", and the "man" pages.

    Background programs in Windows are "services", and have no display window, at all. Services need to be installed, and registry entries changed. Google for "Windows service install program", and be sure it works on your specific version of Windows.

    I couldn't add code to your program, however.

  11. #11
    Registered User
    Join Date
    May 2010
    Posts
    2,701
    How about running your program from your bat file?

  12. #12
    Registered User
    Join Date
    Jul 2010
    Posts
    5
    Thanks for the feedback guys will give it a go

  13. #13
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Quote Originally Posted by wilds View Post
    I'm not sure - I'm really new to this, so just trying to alter the original code to do what I need
    So... basically... You learn a programming language but don't know even what language you're learning? What are you using to compile/interpret it?

  14. #14
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,605
    wilds, where did you get that script? Giving us the source will help.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  3. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 04:02 AM
  4. Basic text file encoder
    By Abda92 in forum C Programming
    Replies: 15
    Last Post: 05-22-2007, 01:19 PM
  5. file & linked list run time error
    By Micko in forum C Programming
    Replies: 9
    Last Post: 03-06-2004, 01:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21