Batch files?

anneteesocial

New member
Local time
3:09 PM
Messages
2
hello guys im new to this forum.

I'm trying to write a simple batch file which copies a couple of files from a network address to mulitple directories on the C:\ of different pc's

eg xcopy from lets say A:\source.file

to PC1 (directory user 1 folder, user 4 folder, user 7 folder, default)
to PC2 (directory user 2 folder, user 8 folder, user 9 folder, default)
to PC3 (directory user 3 folder, user 2 folder, user 1 folder, default)

basically there are 60 staff across a couple of offices and all i want to do is copy 2 desktop shortcuts across each active user desktop.

I'm alright up to copying it to the default directory, but short of speaking to IT and getting every single user name, wanting to know if there is a prompt to do a directory list and then copy to each actual folder?

i doubt i would be able to use the old school dir command, but open to any suggestions that may arise from other users.
 

My Computer My Computer

Computer type
PC/Desktop
OS
window 7 64bit
OK I've worked out a bit more :)

i did further googling and noticed the %homepath% variable.

@ECHO OFF
xcopy b:12d_Model_10_64bit.lnk c:\%homepath%\Desktop /i /y
xcopy "A:\xxx\CAD\profiles\xxxx_ 2014.lnk" c:\%homepath%\Desktop /i /y
xcopy b:12d_Model_10_64bit.lnk C:\Users\Default\Desktop /i /y
xcopy "A:\xxx\CAD\profiles\xxxx_ 2014.lnk" C:\Users\Default\Desktop /i /y
xcopy b:12d_Model_10_64bit.lnk C:\Users\Public\Desktop /i /y
xcopy "A:\xxx\CAD\profiles\xxxx_ 2014.lnk" C:\Users\Public\Desktop /i /y

this allows me to copy files to the active user, the default profile and the public user so any new people will instantly get these files
 

My Computer My Computer

Computer type
PC/Desktop
OS
window 7 64bit
Back
Top