Cari Blog Ini

08 Juni 2012

Copy and Rename One File Using Visual Basic

-----code:start
Sub Copy_One_File()
    FileCopy "C:\Users\SourceFolder\Test.xls", "C:\Users\DestFolder\Test.xls"
End Sub

Sub Move_Rename_One_File()
'You can change the path and file name
    Name "C:\Users\SourceFolder\Test.xls" As "C:\Users\DestFolder\TestNew.xls"
End Sub
-----code:start

Source:
http://www.rondebruin.nl/folder.htm