Jagdev
02-25-2015, 04:23 AM
Hi Experts
I have find the below code which is moving excel files from one folder to another. I have same requirement, but the files are word docs can we use the same for it.
Sub movefile2()
oldpath = "E:\test1\"
newpath = "E:\test2\"
Fname = Dir(oldpath & "*.xls*")
Do While Fname <> ""
Name oldpath & Fname As newpath & Fname
Fname = Dir
Loop
End Sub
If yes, I have main folder with four sub-folders in it and the files are saved in all the sub-folders. Is it possible to move all the files from these sub-folders into one folder only.
Regards,
JD
I have find the below code which is moving excel files from one folder to another. I have same requirement, but the files are word docs can we use the same for it.
Sub movefile2()
oldpath = "E:\test1\"
newpath = "E:\test2\"
Fname = Dir(oldpath & "*.xls*")
Do While Fname <> ""
Name oldpath & Fname As newpath & Fname
Fname = Dir
Loop
End Sub
If yes, I have main folder with four sub-folders in it and the files are saved in all the sub-folders. Is it possible to move all the files from these sub-folders into one folder only.
Regards,
JD