PDA

View Full Version : File Copying From/to different Folders



pratyathedon
07-27-2012, 09:35 AM
Hello guyz,
I would like to have your help on this one.
On my excel sheet one column is dedicated to file names, the second column is dedicated to relative paths.i.e.
A B
a.bmp Pic\bmp
b.jpeg Pic\jpeg
what i want to do is to when i select the a.bmp only, it should get copied to another user given directory.
The source of these file's are at C drive i.e. C:\Pic\bmp or C:\Pic\jpeg.
If the user select D drive as destination then the files should get copied into D:\Pic\bmp or D:\Pic\jpeg.
I want the user to select which file he want to copy, if he selects one ,the file should get copied into respective folder, if he selects both, both of them should get copied into respective folder.
Any idea on how to do this.
As we have to use Range for file/folder selection and fs object to choose the destination folder.
Please spare some of your time to solve this problem, will appreciate your help

Kenneth Hobs
07-27-2012, 04:04 PM
Welcome to the forum!

Did you want the user to pick a drive or set it in a cell or just copy to D drive from C?

Will the column B relative paths need to be created or will the always exist in both the source and destination drive:\paths?

pratyathedon
07-27-2012, 08:01 PM
The relative paths will exist in C drive but we have to create the paths in D drive.
Let the destination drive be common D:\.
I can list out files and folder/subfolder info.see attached document.
Now when i press a button, the excel should ask me the range selection for file names, when i select files and press another button the files should go into D:\ drive with respected folder name (which will be according to the column F in attached file).