View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nikos Yannacopoulos[_5_] Nikos Yannacopoulos[_5_] is offline
external usenet poster
 
Posts: 80
Default copy files from one dir to another

oldname = Range("B3").value

where I have assumed the file name is in B3. Change accordingly.

HTH,
Nikos

"rvik " wrote in message
...
hai

a cell address contains a file name. i want the file name in the cell
address to be the input for the code below, so that the file is copied
to a new location....i.e. instead of the "test.doc", i should have the
file name mentioned in the cell address


Sub file_trf_copy()
oldname = "C:\test.doc"
newname = "\\....\test.doc"
FileCopy oldname, newname
End Sub
test.doc


---
Message posted from http://www.ExcelForum.com/