Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Find & Copy Files Listed in Excel Worksheet ?

I have a list of filenames (complete with file extensions) in a single column
in an Excel Worksheet. All of these listed files are in the same folder
(along with many other files) on the hard drive. Each filename in the list
is hyperlinked to the actual filespec (drive, folder, filename). The list
may contain several hundred filenames. How do I read the list of filenames,
find the actual files, and copy them all at once into a separate folder on
the hard drive? I can manually search with Win Explorer and select each file
using Ctrl-Click & mass copy using Paste, but its very laborious. Is there a
commercial software product to accomplish this job? I'm using Win Vista Home
Premium & Excel 2007. Also have XP Pro & Excel 2003 available.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Find & Copy Files Listed in Excel Worksheet ?

you could have your VBA macro read the rows in the Excel sheet one at
a time.
For each file name use the InStrRev function to find the base name of
the file (ie to strip of the drive and folder part of the file name)
then use the FileCopy statement to copy the file from its original
location to the target folder .

Catherine

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Find & Copy Files Listed in Excel Worksheet ?



" wrote:

you could have your VBA macro read the rows in the Excel sheet one at
a time.
For each file name use the InStrRev function to find the base name of
the file (ie to strip of the drive and folder part of the file name)
then use the FileCopy statement to copy the file from its original
location to the target folder .

Catherine


Hi Catherine ...

Thanks for your suggestion ... will give it a go. I can easily delete the
hyperlinks & end up with a list of base filenames (with Extensions, but
stripped of Drive and Folder) in a single column in the worksheet. I'm an
amateur with VBA, but can Do Loop thru the list & use the FileCopy Statement
on each row (cell) in the list. Not sure how to program substitution of the
filename (in each cell of the worksheet) into SourceFile and DestinationFile
in the FileCopy Statement. Will pursue it ... thanks again for your help!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove listed shortcuts for deleted Excel files? Dave Excel Discussion (Misc queries) 1 August 11th 08 01:06 AM
How to exctract files listed in an Excel-file from a folder? skiern Excel Discussion (Misc queries) 2 May 6th 06 04:41 PM
increase number of files listed In the drop down box on my compute vicki Excel Discussion (Misc queries) 3 February 2nd 06 07:08 PM
Copy Excel data content listed in 3 columns into a single column mooorrona Excel Programming 1 January 12th 05 04:14 AM
why can't excel do a simple find and copy row from a worksheet to. rasman Excel Worksheet Functions 2 December 28th 04 05:49 PM


All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"