I have a file that i need copied to many destination folders (redirected desktop's) and a startup script hasn't worked.
Is there some application? or a script (foreach / for next loop?) that anyone has used that would work?
thanks
fooby
I have a file that i need copied to many destination folders (redirected desktop's) and a startup script hasn't worked.
Is there some application? or a script (foreach / for next loop?) that anyone has used that would work?
thanks
fooby
Sorted.
part1.cmd
part2.cmdCode:IF (%1)==() GOTO usage dir %1 /A:D /B > dir.txt for /F "delims= tokens=1" %%a in (dir.txt) do call part2.cmd %1 %%a GOTO End :usage ECHO Usage: part1.cmd <Drive:\Directory of Parent Folder> :End
Code:if %2==bytes GOTO :End copy "c:\folder\item.exe" %1\%2\ /Y :End
Usage.
1. Place carefully on C:\temp (or whatever folder)
2. Modify part2.cmd (what you want to get done to each object)
3. C:\temp> part1 h:\staffdesktops
foobyCode:C:\temp>call part2.cmd h:\user1 C:\temp>if user1 == bytes GOTO :End C:\temp>copy "c:\temp\item.exe" h:\user1\ /Y 1 file(s) copied. C:\temp>call part2.cmd h:\user2 C:\temp>if user2 == bytes GOTO :End C:\temp>copy "c:\temp\item.exe" h:\user2\ /Y 1 file(s) copied.
Keywords: One to many, many destinations, many folders
There are currently 1 users browsing this thread. (0 members and 1 guests)