View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Automate searching and then copying files to a folder using excel

You can use FileCopy in a loop (through the cells in A) and use the cell value in the code instead of a string

Sub Copy_One_File()
FileCopy "C:\Users\Ron\SourceFolder\Test.xls", "C:\Users\Ron\DestFolder\Test.xls"
End Sub

Or

Sub Move_Rename_One_File()
'You can change the path and file name
Name "C:\Users\Ron\SourceFolder\Test.xls" As "C:\Users\Ron\DestFolder\TestNew.xls"
End Sub

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"SP" wrote in message ...
Hi

I am looking for a process that will optimize the time and effort.
I have an excel file which contains a list (1000) of file names in its
column "A".

These 1000 files are present in different folders under single folder on the
network drive.
My task is to search one by one files from the network and copy the same
into an output folder.

I understand his will take enormous time & effort to do it manually.

So, I am looking for an automation which can interface the MS excel file
with the windows searching and copying.

Appreciate your help.

Thanks

SP.