ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automate searching and then copying files to a folder using excel (https://www.excelbanter.com/excel-programming/428782-automate-searching-then-copying-files-folder-using-excel.html)

sp

Automate searching and then copying files to a folder using excel
 
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.


PJFry

Automate searching and then copying files to a folder using excel
 
How many folders are we talking about? And do you know what they are?
--
Regards,

PJ
Please rate this post using the vote buttons if it was helpful.



"SP" wrote:

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.


Ron de Bruin

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.



All times are GMT +1. The time now is 02:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com