Re: Copy file with multiple names



I realise that you have a mechanism in place for deleting
old files. However, a robust program must be able to
deal with exceptions. If your program does not run one
day for some unexpected and unforeseeable reason then
you will have two files of the form "name.#####.20071011024021.txt".
From that day onwards your program will fail unless you plan
right now for this contingency. If you don't then you're planning
for failure.



"Jeff C" <JeffC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:62B4BCB2-DD7D-49C8-8624-FE437E256C49@xxxxxxxxxxxxxxxx
I did not think to explain the entire process I had in mind. I routinely
use
a program called docuanalyzer inwhich I build a model for data extraction.
I
automate this exporting the extracted data into a usable form then compile
the data using scheduled macros in MS Access. Using ODBC linked
spreadsheets
I have automated pivot table reports generated from data.

These are a new data source for me and I have never tackled this type of
naming convention. The other spooled reports I get overwrite themselves
each
day with the same name.

Once I append the new data to my data tables I would delete the files and
leave the destination folder empty for the next days files to come down.

Thanks for your help, hope you can assist me.
--
Jeff C
Live Well .. Be Happy In All You Do


"Pegasus (MVP)" wrote:


"Jeff C" <JeffC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:76780D24-C1ED-46D1-B41A-B31D8ACB3114@xxxxxxxxxxxxxxxx
I was finally able to get some mainfraim reports spooled to download to
text
files every morning rather than useing Document Direct. The problem is
that
for every report that comes down every morning there are multiple
copies
with
names the same followed by "name.#####.20071011024021.txt" for example.

I have been unsuccessful getting a script to move and rename the file.

So Far:

Dim oFSO
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.CopyFile "Q:\name*.txt","U:\DocDirectReports\name.txt", True

Can anyone assist?

Thanks in advance
--
Jeff C
Live Well .. Be Happy In All You Do

Before you decide HOW to do this, you need to work out
WHAT you want to do. Just renaming the files will not really
work: Sooner or later you will have two of these reports, and
you obviously cannot rename both to the same name. What
now?





.