I have some file in certain folder.
I would like to write macros that run on selected range , duplicate this file & gives then name from a range. It may be a file in any format (xls, pdf, jpg).
I will appreciate any little hint.
Thanks
I have some file in certain folder.
I would like to write macros that run on selected range , duplicate this file & gives then name from a range. It may be a file in any format (xls, pdf, jpg).
I will appreciate any little hint.
Thanks
Re: Duplicating files
1-an example would be nice to know the structure of a range you are thinking of.
2-also are we renaming all the files in a certain folder, or is their a condition
3-Are there any conditions of which files get named what from the range, or does it not matter?
Re: Duplicating files
Take a look at the Name statement and FileCopy in VBA.
Re: Duplicating files
laythss, I have next sample.
1. Column A
---------
golf
bora
polo
2. file c:\car.jpg
need to get output
c:\golf.jpg
c:\bora.jpg
c:\polo.jpg
Thanks
Re: Duplicating files
I am sorry Jonny but I did not get this, I think I understtod the following:
the column you have the wanna be file names is column A.
the directory you want to files to be in is c:\
but the part with the file c:\cars.jpg I am not 100% understanding. Do you want to change this file name. That would mean you would have 3 identical files but with different names. Is this what you are saying?
Re: Duplicating files
here I go again shooting in the dark. I am attaching a file, try it and see if this is what you are looking for, by the way the code is on sheet1 (in the VBA)
Re: Duplicating files
Dear laythss.
It exactly what I need.
Many thanks
Don’t have an account yet? Register yourself now and be a part of our community!