Re: save multiple files with different names in other drive using



One more thing, the beginning of the code is below.

Dim idPth As String
Let idPth = strXXX & " " & txtGroupNumber
Let yyr = strYear



"Conan Kelly" wrote:

Lois,

This will take some doin', but still need some more info.

Do each of the source files get save in each of the destination
folders.........or do some files belong to ABC Co, some to DEF Co, etc.? If
so, how do you determine which file belongs to which company?

Each source file is a text file? ...tab delimited? So each text file will
need to be opened in XL, then saved as an XL Workbook file in a new
location, correct?

Is there any chance that files could exist in the destination folders with
the same names? If I "save as" and the file already exists, do I overwrite
the existing file, do I cancel and close the file w/o making any changes,
etc...?

There are probably going to be a few more questions, but I can't think of
any right now.

conan


"Lois" <Lois@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0B58E3DC-F9AD-49FB-9856-0D0B1F495E73@xxxxxxxxxxxxxxxx
Hi Kelly- The files are named with the customer # in the name. Ex: file
ENR0200XXX00003 ..would be for customer XXX00003, ABC Company. the
destination folder would be called ABC Company. The company name is not
part
of the file name. The resutling file name should not change. It needs to
remain named as ENR0200xxx00003. There are existing approriate folders
for
each customer and I want the files to go to each folder of its
corresponding
name. The source files will be left alone and remain.

Source File name: ENR0200XXX00003.txt
*** names have the same as above. I'm assuming you mean the tab name of
the work***? If so, it would ENR0200XXX00003.
Source File Format= txt file
Destination file format= ABC Company folder as excel format

I hope this helps and thanks!



Thanks-

"Conan Kelly" wrote:

Lois,

Yes it is possible, but I need more info.

Where is "ABC Company" coming from? From a file name? From a *** name?

How about "customer # XXX00003"? Is that coming from a file name or
***
name?

I understand about the folders/locations you want resulting files save
at/in, but what do you want the resulting file name to be?

Do you want this code to loop through all files in one folder and then
create appropriate folders and save resulting files in those folders?
Are
the source files going to be left alone, moved, copied, deleted?

Please give examples of:
--Source File Names
--# of Sheets/Sheet Names in each source file
--Source File Format
--Destination File Names
--# of Sheets/Sheet Names in each destination file
--Destination file format
--etc...

HTH,

Conan

"Lois" <Lois@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:237DA048-A6F3-4FFA-9784-BE63C7F58AAC@xxxxxxxxxxxxxxxx
Is it possible to have an excel macro to automatically save many files
in
another drive with the specific name of each file in its own folder
using
a
simple code? Currently, we use an excel macro to format text files to
an
excel file with subtotals and they are saved to their own unique
folder.
There are approx. over 1000 files that are run through this macro each
week.

Example, ABC company with customer # XXX00003 has 10 files that need to
be
saved under drive M:\ABC Company 2007\ and DEF company with customer #
XXX00004 has 20 files that need to be saved under drive M:\DEF Company
2007\,
and so on. Currently, the files are saving to their own folders through
the
macro using the function: where 'ABC Company' 'XXX0 0004', however, we
need
to manually add this 'where' code for each group's name and customer#
to
the
macro.

I want to be able to not have to add in each new customer's name and
number
code since new customers are being added to the macro constantly. Any
help
is
very much appreciated. Thanks, LW






.


Loading