Connecting Tech Pros Worldwide Forums | Help | Site Map

Copying file

Newbie
 
Join Date: Mar 2007
Posts: 7
#1: Mar 15 '07
Hello there!
I want to copy the file with different name within same folder. I am not seeing any method in FileSystemObject which will do it. Does anybody know how to do it? Please help me, It's urgent.

vijaydiwakar's Avatar
Site Addict
 
Join Date: Feb 2007
Posts: 579
#2: Mar 15 '07

re: Copying file


Quote:

Originally Posted by varsha desai

Hello there!
I want to copy the file with different name within same folder. I am not seeing any method in FileSystemObject which will do it. Does anybody know how to do it? Please help me, It's urgent.

try to use this code
Expand|Select|Wrap|Line Numbers
  1. Dim fSys As New FileSystemObject
  2. Private Sub Form_Load()
  3.     fSys.CopyFile "C:\a.jpg", "D:\", True
  4. End Sub
  5.  
Reply