Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to read inputs from a file & process the program  (Read 2606 times)

0 Members and 1 Guest are viewing this topic.

Yogesh123

    Topic Starter


    Beginner

    How to read inputs from a file & process the program
    « on: June 17, 2010, 07:03:18 AM »
    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"

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: How to read inputs from a file & process the program
    « Reply #1 on: June 17, 2010, 04:07:03 PM »
    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.  8)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    Yogesh123

      Topic Starter


      Beginner

      Re: How to read inputs from a file & process the program
      « Reply #2 on: June 18, 2010, 12:54:28 AM »
      Dear Sidewinder,
      Thanks a lot!!!
      this works great!!!