[RESOLVED] delete files older than 1 months-VBForums
Results 1 to 2 of 2

Thread: [RESOLVED] delete files older than 1 months

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2017
    Posts
    70

    Resolved [RESOLVED] delete files older than 1 months

    Guys, I think the subject is self explanatory... I need to delete the files in a folder older than 1 months say...


    Now, say I have 2 folders (or even 1) which contains log files. The files are generated per day basis normally. Because
    Code:
    Dim timestamp As String = Format(Now, "hh:mm:ss dd-MM-yyyy")
            Dim path As String = "c:\SOFTWARE\" & Format(Now, "yyyy-MM-dd") & "-opslog.txt"
    is my file creation. If available, append and if not, then make one. so far this part is okey. Now, I have a subroutine that will fireup some daily basis maintenance works. Part of that is deleting the old files... the time frame will be taken from user via a form, and will be kept in a global variable. (I can do that, say public dim cutofffdate as integer). Now, I need to delete the files older than "cutoffdate". Any ideas??

    platform is vb.net

    Mishu~

  2. #2

    Thread Starter
    Lively Member
    Join Date
    May 2017
    Posts
    70

    Re: delete files older than 1 months

    guys... solved!!

    Microsoft Website

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width