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

Author Topic: What Command that promt to Fill In Text  (Read 2833 times)

0 Members and 1 Guest are viewing this topic.

bam137

    Topic Starter


    Greenhorn

    What Command that promt to Fill In Text
    « on: January 12, 2009, 09:00:54 PM »
    Hi All,

    Can you help me how to make a command that can promt & ask to fill in something text. Then that text will be added in the text data file.

    Thanks

    e-Bam

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: What Command that promt to Fill In Text
    « Reply #1 on: January 13, 2009, 05:26:40 AM »
    Sorry, but I don't really understand the question.

    So you want a batch file that will ask for text, and when you press Enter it is saved in a text file?

    bam137

      Topic Starter


      Greenhorn

      Re: What Command that promt to Fill In Text
      « Reply #2 on: January 13, 2009, 06:17:26 AM »
      1st of all, thanks guys reply my question...

      That say I click a batch file, then the dos will promt:

      "Please Key In The Invoice No. :   "

      After you key in the number that say 1234, then this number will be added to the text file.

      So,
      1. How to make that question appear & functional?
      2. How to insert the '1234' to the text file?

      Thanks, Your help much2 appreacited.

      e-Bam


      BatchFileCommand



        Hopeful
      • Thanked: 1
        Re: What Command that promt to Fill In Text
        « Reply #3 on: January 13, 2009, 06:23:42 AM »
        Here's a code that will do just what you are asking for.

        Quote
        :start
        set /p variable=Please Key In The INvoice No.
        echo "%variable%" > some_file
        pause>nul
        goto start
        οτη άβγαλτος μεταφ βαθμολογία

        bam137

          Topic Starter


          Greenhorn

          Re: What Command that promt to Fill In Text
          « Reply #4 on: January 13, 2009, 06:28:25 AM »
          Thanks dude, I appreaciate that..

          I will try to use it..

          e-Bam

          bam137

            Topic Starter


            Greenhorn

            Re: What Command that promt to Fill In Text
            « Reply #5 on: January 13, 2009, 06:34:00 AM »
            Thanks guys (BatchFileCommand).. Its working..

            e-bam

            bam137

              Topic Starter


              Greenhorn

              Re: What Command that promt to Fill In Text
              « Reply #6 on: January 13, 2009, 11:20:11 PM »
              Continue from the last question. Now the situation is;

              You have 1 text file called “data.txt” in 1 folder named “SOURCE”.

              The data.txt has a numbers of characters as per below:

              Bam;060180;engineer
              John;050881;executive
              Salem;151281;hackers
              :
              :

              When you click the batch file, you will be asking to insert the invoice no. as per yesterday discussion.

              The question is, how to make output data.txt file as per below?

              Invoice No: 1234
              Bam;060180;engineer
              John;050881;executive
              Salem;151281;hackers
              :
              :

              Please advice..

              Helpmeh



                Guru

              • Roar.
              • Thanked: 123
                • Yes
                • Yes
              • Computer: Specs
              • Experience: Familiar
              • OS: Windows 8
              Re: What Command that promt to Fill In Text
              « Reply #7 on: January 14, 2009, 06:41:31 PM »
              So, you want it to display
              Quote
              Invoice Number:
              followed by the invoice number? Simple!

              Where it says
              Quote
              echo "%variable%" > some_file
              replace that with
              Code: [Select]
              echo Invoice No: "%variable%" > some_file
              If you want it to display Invoice No at the begining, that gets a bit tricky...But it's still possible!

              Code: [Select]
              Echo Invoice No: "%variable%" > some_other_file
              type data.txt >> some_other_file
              type some_other_file > data.txt
              del some_other_file

              There, that will do it. Here is a step-by-step explanation of the script:
              1. Sends "Invoice No: %variable%" to some_other_file which is important.
              2. Sends the full contents of data.txt to the end of some_other_file.
              3. Sends the full contents of some_other_file (part 1 + 2) to data.txt and overrides anything that was previously in data.txt
              4. Deletes some_other_file.

              Understand?
              Where's MagicSpeed?
              Quote from: 'matt'
              He's playing a game called IRL. Great graphics, *censored* gameplay.

              bam137

                Topic Starter


                Greenhorn

                Re: What Command that promt to Fill In Text
                « Reply #8 on: January 14, 2009, 07:03:45 PM »
                I've understand whats u means. Thanks a lot.

                BTW, yesterday I've build up the command like this:

                Code: [Select]
                SET /P VARIABLE=Please Key In DD No. and NAME:
                ECHO "%VARIABLE%" > C:\HLA\PAGECOUNT\DDNO\DDNo.txt
                PAUSE

                REM --- Merge the DDNo.txt with Data file
                COPY "C:\HLA\PAGECOUNT\DDNO\DDNo.txt"+"C:\HLA\PAGECOUNT\PDFPROCESS\NGC_DAILY.txt" "C:\HLA\PAGECOUNT\PDFPROCESS\SUBMERGING\NGC_DAILY.txt

                I use Merging command where, I create 1 file DDNo, then merge with the data text. Then its work.

                How bout if u want to insert the text line in the middle of data text?

                e-Bam