Move file to a different folder

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got a short vba program that extracts data from a spreadsheet, massages
the data and then puts the data into a comma delimited text file. When I'm
done with the spreadsheet, I'd like to move it from the i:\defective reports\
subdirectory to the i:\defective reports\processed\ subdirectory so that I
don't put the same data into my text file twice. Could anyone show me how to
do this? The spreadsheet file name variable is called SheetFileName.
TIA.
 
The simplest way would probably be to just copy it, and then delete it from
original location:

FileCopy "i:\defective reports\" & SheetFileName, "i:\defective
reports\processed\" & SheetFileName
Kill "i:\defective reports\" & SheetFileName

-Erik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top