+ Reply to Thread
Results 1 to 9 of 9

A simple bat that will delete itself after running

  1. #1
    Forum Contributor
    Join Date
    06-23-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    239

    A simple bat that will delete itself after running

    I would like to have my bat file delete itself after executing
    Last edited by b_rianv; 08-20-2019 at 12:58 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,381

    Re: A simple bat file killing me

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,880

    Re: A simple bat that will delete itself after running

    Wrong forum? Don't think question has anything to do with Excel...

    At any rate, depending on your need, you can do one of the following.
    1. If you want cmd prompt displayed and kept after execution.
    Please Login or Register  to view this content.
    2. If not just remove cmd /k

    These should go at very end of *.bat file.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: A simple bat that will delete itself after running

    I wonder how many members even know how to code in DOS, let alone what a BAT file is?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Contributor
    Join Date
    06-23-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    239

    Re: A simple bat that will delete itself after running

    @ck76 Thank you for answering back your input was knid but it didn't work.

    Please Login or Register  to view this content.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,381

    Re: A simple bat that will delete itself after running

    What does this have to do with Excel?

  7. #7
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,880

    Re: A simple bat that will delete itself after running

    Replace...
    Please Login or Register  to view this content.
    With just...
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    06-23-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    239

    Re: A simple bat that will delete itself after running

    @CK76
    Thank you so much for taking the time to help out as it is working now

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: A simple bat that will delete itself after running

    Quote Originally Posted by AliGW View Post
    What does this have to do with Excel?
    Good point, I will move it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 08-13-2019, 12:58 AM
  2. [SOLVED] Large file size on a simple excel file
    By FieldHaven in forum Excel General
    Replies: 2
    Last Post: 11-16-2014, 01:59 AM
  3. VBA Code for Killing File if File Location Changes (How To?)
    By Jaccobk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2012, 02:50 PM
  4. Killing a file that is open
    By jeffbg123 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-03-2010, 01:02 PM
  5. Simple chart!!! This is killing me!
    By brad.tho in forum Excel Charting & Pivots
    Replies: 12
    Last Post: 09-17-2008, 03:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1