sharepoint0520
asked on
How to move all files from subfolders to one folder by VBA code ?
Experts,
I have one Folders and it has some sub folders and Subfolder has files like excel , word etc... I would like to have one small program when i set source and destination folder and run the script to get all only excel files to Destination folder.
Please let me know if you need more clarification..
Thanks,
I have one Folders and it has some sub folders and Subfolder has files like excel , word etc... I would like to have one small program when i set source and destination folder and run the script to get all only excel files to Destination folder.
Please let me know if you need more clarification..
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
sorry i don't see (only excel files)
please try this
please try this
SET MoveDirSource=c:\source
SET MoveDirDestination=d:\destnation
ROBOCOPY *.xls* "%MoveDirSource%" "%MoveDirDestination%" /MOVE /E
ASKER
Hi,
Can you please write codes in Module or any Excel form ? Is it possible to attach Excel file for you guys ? I am not clear to use Function.
Can you please write codes in Module or any Excel form ? Is it possible to attach Excel file for you guys ? I am not clear to use Function.
ASKER
NVIT,
How to use this function in Module ? I would like to Button to click to move files. Any advice?
How to use this function in Module ? I would like to Button to click to move files. Any advice?
ASKER
I got it.
also you can save it as a batch file to run in scheduled time
Open in new window