Script to Delete Directory Based on File Inside

Discussion in 'Scripts' started by net1tek, Jul 13, 2009.

  1. #1
    Hi there. I have seen many scripts to delete folders or files based on size or age. But I have not seen any scripts that can delete a directory based on a specific file inside. So I don't know if it's possible. Is it possible for a script to say find every directory that contains the file "trash.txt" and delete that directory? Thanks in advance.
     
    net1tek, Jul 13, 2009 IP
  2. JREAM

    JREAM Member

    Messages:
    160
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    30
    #2
    You would have to run the actual PHP file through a CronJob or do it manually, but yes that is very do-able and would only take a few hours to write I suppose. If dont you write PHP it would be fairly easy to figure out.
     
    JREAM, Jul 13, 2009 IP
  3. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #3
    hmm never heard about so you should go for a custom solution
    just contact me if you want
     
    crivion, Jul 13, 2009 IP