+ Reply to Thread
Results 1 to 8 of 8

Kill all notepad files in a folder

  1. #1
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Kill all notepad files in a folder

    Hi,
    I am looking for a macro or a single line macro to delete all the notepad files in the folder by vba
    Thnx Alot

  2. #2
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Kill all notepad files in a folder

    Try this;

    Please Login or Register  to view this content.
    Last edited by Haluk; 09-23-2020 at 02:32 AM.

  3. #3
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Kill all notepad files in a folder

    Thnx Alot Haluk Sir for helping me in solving this Problem Sir
    Have a Awesome Day Sir

  4. #4
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Kill all notepad files in a folder

    You're welcome...

  5. #5
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Kill all notepad files in a folder

    I have one issue with this macro
    Please Login or Register  to view this content.

    There is a chance that in this path C:\TestFolder, may be there will be files or may be it will not be there
    So if file is there then delete all the files in that folder & if files are not there then dont do anything(I ran the macro & file was not there & i got error, so slight correction is required in this macro)

  6. #6
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Kill all notepad files in a folder

    You can try this;

    Please Login or Register  to view this content.
    and, you can try this as well;

    Please Login or Register  to view this content.
    or, this;

    Please Login or Register  to view this content.
    Last edited by Haluk; 09-23-2020 at 03:27 AM.

  7. #7
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Kill all notepad files in a folder

    Thnx Alot Haluk Sir for helping me in the same

  8. #8
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Kill all notepad files in a folder

    You're welcome...

+ 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: 1
    Last Post: 05-29-2018, 05:03 PM
  2. [SOLVED] Kill .xlxs in a folder path cell
    By jimraynor in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-19-2018, 07:51 PM
  3. Kill AutoSave on Sharepoint Files
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2018, 02:50 PM
  4. [SOLVED] Kill macro if no sheets in folder
    By Crispy85 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-17-2015, 07:32 AM
  5. [SOLVED] Kill all files which are located in the spesific folder
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2015, 08:47 AM
  6. Replies: 3
    Last Post: 04-08-2012, 06:52 PM
  7. Kill all non excel files in folder
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-05-2012, 11:17 AM

Tags for this Thread

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