Locating & Moving Referenced File In Cell

Zzorkk

New Member
Joined
Jan 24, 2011
Messages
5
I have a range of cells (a1:a2000), each of which contains a location of a unique computer file (c:\old folder\sample1.txt) that may or may not actually exist. I need to construct a macro that will ask Excel to search for the file listed in each cell and, if the file does exist, move it to another folder (c:\new folder\sample1.txt).

Additionally, when it does actually find a file that does exist, it would be helpful if Excel could place an "X" in another cell in the spreadsheet or in some way note that the file was found to exist.

Is this possible? If so, can you offer any ideas on how to do so? Thanks in advance for your assistance?
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
can't help you with the moving the files part but if you just want to catalogue what you have, i 'd use Karen's Directory Printer utitlity (free) at:

you could also use to to create an 'as-is' list to compare to the older file info you already have

http://www.karenware.com/powertools/ptdirprn.asp

if this doesn't do what you need and you really need the 'move the files' piece, put a reply post so the VBA gurus here know this request still needs help
 
Upvote 0
Hi Matttclark,

Thanks for the quick reply. I really appreciate the link. However, I don't think that will solve the question. I really need to figure out a way to move the files and note it on Excel. Thanks again for your help!
 
Upvote 0
Just for clarification, I'm trying to look up the file listed in the Excel spreadsheet cell and then, if it actually exists, move it to another folder. I would then like it to note Excel as to whether the file actually existed.

In case it matters, I'm using Excel 2007. Thanks again for your help.
 
Upvote 0

Forum statistics

Threads
1,216,163
Messages
6,129,225
Members
449,495
Latest member
janzablox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top