1.

Solve : How to read inputs from a file & process the program?

Answer»

i am having file in which list of IP addresses are mentained,
and on all those ip-addresses i WANTED to schedule a perticular program,
How do i read the input file IP-addresses one-by-one, to schedule a program on all IP-addresses at a time,

Input.txt contains
10.48.118.x
10.48.118.y
10.48.118.z
& so on......

wanted to schedule following program on client IP-addresse's
cd\
C:
MKDIR \\10.48.118.x\c$\new_folder
copy test \\10.48.118.x\c$\new_folder\
for /L %h in (0,4,20) do AT \\10.48.118.x %h:00 /interactive /EVERY:m,t,w,th,f,s,su "C:\new_folder\process_para.exe"I couldn't test this because of network addressing differences. Let us know how you make out.

Code: [Select]cd\
C:
for /f %%v in (input.txt) do (
mkdir \\%%v\c$\new_folder
copy test \\%%v\c$\new_folder\
for /L %%h in (0,4,20) do AT \\%%v %%h:00 /interactive /EVERY:m,t,w,th,f,s,su "C:\new_folder\process_para.exe"
)

Good luck. Dear SIDEWINDER,
Thanks a lot!!!
this works great!!!



Discussion

No Comment Found