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

Author Topic: Batch script to read a .DAT file & rename it  (Read 3978 times)

0 Members and 1 Guest are viewing this topic.

yadavmanoj

    Topic Starter


    Newbie

    • Experience: Experienced
    • OS: Linux variant
    Batch script to read a .DAT file & rename it
    « on: March 07, 2014, 09:25:53 PM »
    I need a batch script which can read a file *.D00000.DAT and find the specific line as below

    *-*-* Job: 1111 Name: ABCDEFGH User: ABCXYZ Date: 03/13/14 Time: 11:50:00 *-*-*

    and store Job, Name, Date & Time in different variables.

    Then do the following:

    1. close the file and rename it with "Name".
    2. Create a folder and name it with Job-Name-Date-Time
    3. Move the renamed file into the folder
    4. repeat the process for next *.D00000.DAT file

    Lemonilla



      Apprentice

    • "Too sweet"
    • Thanked: 70
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 7
    Re: Batch script to read a .DAT file & rename it
    « Reply #1 on: March 07, 2014, 09:45:31 PM »
    What have you tried?
    Quote from: patio
    God Bless the DOS Helpers...
    Quote
    If it compiles, send the files.

    yadavmanoj

      Topic Starter


      Newbie

      • Experience: Experienced
      • OS: Linux variant
      Re: Batch script to read a .DAT file & rename it
      « Reply #2 on: March 07, 2014, 09:56:13 PM »
      I am new to Batch script, so I need some startup to go ahead.

      foxidrive



        Specialist
      • Thanked: 268
      • Experience: Experienced
      • OS: Windows 8
      Re: Batch script to read a .DAT file & rename it
      « Reply #3 on: March 07, 2014, 10:00:47 PM »