Copying files into/from directories based on date

S

schaapiee

Here is the concept:
I have reports that are run daily, monthly, etc..
I have a table which tells my webpage how many reports to show..aka
13; (for monthly this would show 13 months worth for that specific
report)
My files are appended with date information in the format of YYYYMM
or
YYYYMMDD respectively.

I want to create an access application which can:
1. Reference an access table which says how many of each report
should
be in the the specific directory.
ie. report1 = 12, report2 = 1, report3 = 35, report4 = 25, etc..
2. Look into that specific directory where the reports are stored.
3. Move the files in excess of the specified amount into an archive
folder located in same directory.


Can I write a date function which says get current date less table
value, then move remaining in folder x to folder y


Let me know if you need more information..
Thanks
Devon
 
S

schaapiee

Additional Info...

Im sorry I wasnt clear.
I am working with windows folders, and either .xls or .pdf files
within them ("the reports")
I am wanting to write vb code which will look at folder 1, read
through a local database to match the file desc[BaseFileName -below]
and move the files to folder 2(empty archive) if the count is greater
than that number[NumberOfHistorical -below].

Example Files in the Windows folder1:


AnalysisByOfficer_13_200601.PDF
AnalysisByOfficer_13_200602.PDF up through current month.
\
\
Example local access table data:


BaseFileName AnalysisByOfficer
InstitutionPrefixCharacter _
AppendInstitution true, this is the 13
AppendDate true
DateFormat _YYYYMM
FileNameExtension PDF
NumberOfHistorical 12


Let me know if I can make this more clear. Thanks again for any help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top