VB6 Directory\File Maintenance

From: John Walker (JohnWalker_at_discussions.microsoft.com)
Date: 12/02/04


Date: Thu, 2 Dec 2004 11:19:03 -0800

Here's the situation: there's a file on my local machine which gets backed up
every night to the network server with the name datetime.BAK. In order to
prevent these files from taking up too much space, I was going to write a VB6
app which would run once a week and delete all but 3 of the most recent
files. I was experimenting with the FileSystemObject and Files object, and
the DIR function, but I can't figure out how to make sure that the 3 files to
be retained are the most recent. I know how to delete files, but don't know
how to 'order' by date. Does anyone have a suggestion as to how I should go
about this? And if sample code is available, that would be great.

Thanks,
John



Relevant Pages

  • Importing files when updated automatically.
    ... Apologies in advance if I should have posted this elsewhere, ... like the most appropriate...let me know if you have a suggestion for a ... different newsgroup. ... files from our network server, and then output two other files (derived data ...
    (microsoft.public.access.modulesdaovba)
  • Re: Role based security on local machine
    ... Is the "MACHINENAME" from your sample code the name of the local machine or ... another machine on the network? ... If it's the local machine, ... It always fails when I specify a group instead of a ...
    (microsoft.public.dotnet.security)
  • Security suggestion
    ... like to 'hide' this password on the local machine in some manner so that if ... the user uninstalls the application and reinstalls, ... Does someone have an article or suggestion on a good ...
    (microsoft.public.vc.mfc)
  • Re: Get current IP address
    ... Dim defaultIPAddress As String = ... > Does anyone have sample code on how to get the current IP address of a ...
    (microsoft.public.dotnet.languages.vb)
  • Get current IP address
    ... Does anyone have sample code on how to get the current IP address of a ... how would you ping your own machine and get the IP address of it ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)