File deletion... please help ....


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: File deletion... please help ....

  1. #1
    Harsha Bhogle Guest

    File deletion... please help ....


    Hi,

    I've an Archive folder where I'll be saving Text files at regular intervals.


    Now I've a SQL Server table which would tell me the exact number of days
    each file in the archive folder should be kept. After the elapse, that particular
    file should be deleted.

    My doubt is - how to find out the number of days that each file has been
    in the folder?

    Thanks,
    Harsha Bhogle

  2. #2
    Duane Snelling Guest

    Re: File deletion... please help ....


    Harsha,

    If you are not modifing the files, grab the files date and match with the
    current date.

    e.g. to get file date:

    DValue = FileDateTime ( filename )

    Hope this helps

    Duane...

    "Harsha Bhogle" <Harsha@techemail.com> wrote:
    >
    >Hi,
    >
    >I've an Archive folder where I'll be saving Text files at regular intervals.
    >
    >
    >Now I've a SQL Server table which would tell me the exact number of days
    >each file in the archive folder should be kept. After the elapse, that particular
    >file should be deleted.
    >
    >My doubt is - how to find out the number of days that each file has been
    >in the folder?
    >
    >Thanks,
    >Harsha Bhogle



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center