Script to copy file to specific folders

March 28, 2010 at 23:18:57
Specs: Windows XP, 2.0 GHz, 512MB
I would like a script that opens a commamd window and calls for a file (icon file) to be copied to a specific folder on 5 different drives. I would like to be able to either paste in the file path or drag and drop the file onto the command window. The icon file will always come from the same folder "C:\WINDOWS\system32\00 ICONS\System Folders" and be copied, sometimes replacing a file with the same name, to these 5 folders:

"W:\WINDOWS\system32\00 ICONS\System Folders"

"X:\0 aAPPS\00 a Install First\00 ICONS\System Folders"

"W:\WINDOWS\system32\00 ICONS\System Folders"

"N:\0 aAPPS\00 a Install First\00 ICONS\System Folders"

"D:\0 aAPPS\00 a Install First\00 ICONS\System Folders"

I apologize if I am using incorrect terms. I don't know if a batch file could do this or if it would have to be done with vbs. I would appreciate the help. I know nothing about writng vbs script and only a little about writing batch files.
Thank you.



See More: Script to copy file to specific folders

Report •

#1
March 29, 2010 at 00:16:00
mebbe sump'n lahk this 'un:
@echo off & setlocal
set drv=%1
if /i %drv% neq "w" (
set pth="%drv%:\0 aAPPS\00 a Install First\00 ICONS\System Folders"
) else (
set pth="W:\WINDOWS\system32\00 ICONS\System Folders"
)
copy /y "c:\WINDOWS\system32\00 ICONS\System Folders" %pth%
::---- end
try that an see, i'm not good with gui-to-batch, so we're even :)
on that score. %1 is assumed to be what you want to paste or drag-drop. I used the driveletter. I assumed that you want a selection of one of the 4 (5?) options and not all of them. two of your elements appear to be identical, so
you might need to adjust for that...

Report •

#2
March 29, 2010 at 03:56:39
My mistake, the second

"W:\WINDOWS\system32\00 ICONS\System Folders"

should have been

"E:\WINDOWS\system32\00 ICONS\System Folders".

I wish to always copy the icon file from the

"C:\WINDOWS\system32\00 ICONS\System Folders"

folder to all 5 of those folders.

The icon file to be copied will always be from that folder on C drive. The dragging and dropping option is not that important to me. If I could copy and paste the file path, or even the filename since it will always be from that folder, I would be satisfied, However, dragging and dropping would be cool.
What would your script be to achieve this? I really appreciate your help and your quick reply to my post.


Report •

#3
March 29, 2010 at 08:06:54
My question was answered on another site.

Here is the link:

http://www.theeldergeek.com/forum/i...


Report •
Related Solutions


Ask Question