Move file to a different folder  
Author Message
rixrix





PostPosted: Sat Oct 30 13:09:04 CDT 2004 Top

Excel Programming >> Move file to a different folder

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.

Excel19  
 
 
E





PostPosted: Sat Oct 30 13:09:04 CDT 2004 Top

Excel Programming >> Move file to a different folder 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



> 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.


 
 
ebferro





PostPosted: Sun Oct 31 04:05:03 CST 2004 Top

Excel Programming >> Move file to a different folder Erik:
That worked great. Thanks for the help.
Ernie



> 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
>


> > 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.
>
>
>