1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Rep Power

    Batch command to close a file?

    I would like to know if there is a batch command to close a file.
    This is the code I have to open run 2 file:

    "C:\Documents and Settings\user\My Documents\flash stuff\mall_ad4.exe"

    "C:\Documents and Settings\user\My Documents\flash stuff\car_test.exe"

    the problem is these are flash animation files and the first file wont close so the second file never gets open. Is there a close file command?
    can it be do? is there another language and code anyone knows of? I need Help
  2. #2
  3. Providing fuel for space ships
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2004
    nr Edinburgh, Scotland
    Rep Power
    There isn't a close command as such for a batch file, but you could use the 'taskkill' command that would close the open application - this can be done by using the PID or the application name, and the latter in this case would be the best option I would imagine.

    You would need to add the line
    taskkill mall_ad4
    Providing that this is the name of the application in the task manager. It's not always necessary to add the '.exe' extension.

    Let me know how you get on.
    The No Ma'am commandments:

    1.) It is O.K. to call hooters 'knockers' and sometimes snack trays
    2.) It is wrong to be French
    3.) It is O.K. to put all bad people in a giant meat grinder
    4.) Lawyers, see rule 3
    5.) It is O.K. to drive a gas guzzler if it helps you get babes
    6.) Everyone should car pool but me
    7.) Bring back the word 'stewardesses'
    8.) Synchronized swimming is not a sport
    9.) Mud wrestling is a sport

IMN logo majestic logo threadwatch logo seochat tools logo