Results 1 to 4 of 4

Thread: How to delete files beyond a certain size

  1. #1
    Join Date
    Nov 2008
    Posts
    26

    How to delete files beyond a certain size

    Good evening,

    I want to make a small batch file to execute a task that seemingly delete every huge file , i want to delete all files that are larger than 100 kb in a given directory. can you tell me how can i do so , most preferably i want to use the dos or the batch files , please help , Thank you in advance for the help

  2. #2
    Join Date
    Nov 2008
    Posts
    111

    Re: How to delete files beyond a certain size

    You might want to try this

    In 1-line batch file
    Code:

    Select all
    For /R %%I In (c:\temp\*.*) Do (if %%~ZI GTR 100 del "%%I")

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: How to delete files beyond a certain size

    this script can also help but, though it is not a batch file

    Dim Path
    Dim lngSize
    Dim fo
    Dim fld
    Dim fles
    Dim file

    lngSize = 10000
    Path = "C:\temp\"
    Set fo = CreateObject("scripting.filesystemobject")
    Set fld = fso.GetFolder(strPath)
    Set fles = fold.files

    For Each file In files
    If file.Size >= lngSize Then file.Delete True
    Next

  4. #4
    Join Date
    Jan 2008
    Posts
    3,388

    Re: How to delete files beyond a certain size

    Using the File Shredder enables you to delete files beyond recovery, using multiple passes, DoD 5220-22.M or the Gutmann method. The program can wipe individual files or entire folders (with optional subfolders), and also integrates with the right-click menu for convenient access from within Windows Explorer. File Shredder can also wipe the free disk space on selected drives, allowing you to erase traces of files that have been deleted previously by using standard deletion methods.

Similar Threads

  1. Replies: 7
    Last Post: 04-05-2012, 12:37 PM
  2. Replies: 5
    Last Post: 12-11-2011, 10:22 PM
  3. GPO for temporary internet files size
    By softte in forum Technology & Internet
    Replies: 3
    Last Post: 22-07-2009, 03:29 PM
  4. What is the limit size of .avi files, to sent via email ?
    By Mr. Gupta in forum Technology & Internet
    Replies: 3
    Last Post: 16-05-2009, 05:24 PM
  5. How To Delete Files Which Windows Wont Delete?
    By Hardik in forum Windows Software
    Replies: 2
    Last Post: 06-03-2007, 12:45 PM

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
  •  
Page generated in 1,713,538,560.97400 seconds with 16 queries