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

Author Topic: Need help - converting the files reading the content from a flat file  (Read 559 times)

0 Members and 1 Guest are viewing this topic.

lalat06bag

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Unknown
    Need help in converting the files reading the content from a flat file in a batch. New to the batch. Please see.

     Source folder would be having all the reports.
     xpdf would be containing pdftotxt.exe which would convert pdf to text file.
     Dest folder would be having the converted content.
     daily_report.txt would contain the pdf files which need to be converted.

     While source would be searched, it would pick all the files mentioned in the daily_report.txt with today's date, convert it and move it to the destination folder. So in the destination folder, there would not be the date part. It would be same in the flat file.txt.

     The files would be looked upon for 2 hours in every 5 mins till all the files are found or the time is reached. If not found, it would be written to the error log.
     Please note: there are few spaces in the file name.

     Source:

     XXXX_QRRPS Tran book - 0utgoing-en-in_2018-02-09T024757245Z.pdf
     XXXX_QRRPS Tran book - Incoming-en-in_2018-02-09T024757245Z.pdf
     XXXX_CB Vol By rce-en-in_2018-02-09T024757245Z.xlsx
     XXXX_ABC_Rec_Eng-en-eu_2018-02-09T024757245Z.pdf
     XXXX_ABC_Rec_Eng-en-eu_2018-02-09T024757245Z.xlsx
     XXXX_QRRPS Tran book - Incoming-en-in_2018-02-08T024757245Z.pdf
     XXXX_QRRPS Tran book - Incoming-en-in_2018-02-08T024757245Z.pdf
     XXXX_CB Vol By rce-en-in_2018-02-08T024757245Z.xlsx
     XXXX_ABC_Rec_Eng-en-eu_2018-02-08T024757245Z.pdf
     XXXX_ABC_Rec_Eng-en-eu_2018-02-08T024757245Z.xlsx

     daily_report.txt would be having
     XXXX_QRRPS Tran book - 0utgoing-en-in.pdf
     XXXX_ABC_Rec_Eng-en-eu.pdf

     dest folder would be having
     XXXX_QRRPS Tran book - 0utgoing-en-in.txt
     XXXX_ABC_Rec_Eng-en-eu.txt

    Squashman



      Specialist
    • Thanked: 119
    • Experience: Experienced
    • OS: Other
    Re: Need help - converting the files reading the content from a flat file
    « Reply #1 on: February 09, 2018, 05:55:01 PM »
    Why don't you at least attempt a solution considering all the help you have already gotten on DosTips.com

    patio

    • Moderator


    • Sage
    • Maud' Dib
    • Thanked: 1674
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: Need help - converting the files reading the content from a flat file
    « Reply #2 on: February 09, 2018, 07:09:25 PM »
     :P
       
     
    " Anyone who goes to a psychiatrist should have his head examined. "