arravalli12
Programmer
I have written a code that copies from my shared drive and copies that file to my local drive.
my existing code is like:
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\Documents and Settings\moparikh\Desktop\test1.csv") Then
objFSO.DeleteFile "C:\Documents and Settings\moparikh\Desktop\test1.csv"
End If
objFSO.CopyFile "G:/Public/web_services/CustomerContacts/Customers.csv" , "C:\Documents and Settings\moparikh\Desktop\", OverwriteExisting
msg = " copied"
MsgBox msg.
This works fine.
Now I want to rename the file in my shared drive with same name + Current date ex: Customers-2005_12_14.csv.
Any suggestions will be appreciated.
Thanks
my existing code is like:
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\Documents and Settings\moparikh\Desktop\test1.csv") Then
objFSO.DeleteFile "C:\Documents and Settings\moparikh\Desktop\test1.csv"
End If
objFSO.CopyFile "G:/Public/web_services/CustomerContacts/Customers.csv" , "C:\Documents and Settings\moparikh\Desktop\", OverwriteExisting
msg = " copied"
MsgBox msg.
This works fine.
Now I want to rename the file in my shared drive with same name + Current date ex: Customers-2005_12_14.csv.
Any suggestions will be appreciated.
Thanks