VBA Code to copy all files from Folder 1 to Folder 2

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,015
Office Version
  1. 2016
Platform
  1. Windows
Hello Friends,

I am using the below code to open folder 1

Code:
Sub OpenFolder()Dim str_folder As String
str_folder = "C:\Users\i ' M\Desktop\Folder 1"
Call Shell("explorer.exe " & str_folder, vbNormalFocus)
Copy
End Sub

I want to open folder 1 > copy all files from this folder to folder 2

Regards,

Humayun
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,015
Office Version
  1. 2016
Platform
  1. Windows
Hi jmacleary,

Sorry for a late reply, I was on holidays...

Thanks for providing the link. I will surely look into that and will come back to you

Regards,

Humayun
 

Watch MrExcel Video

Forum statistics

Threads
1,118,415
Messages
5,571,975
Members
412,430
Latest member
Huuktkt
Top