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

Author Topic: Suppress msg from RENAME command  (Read 5627 times)

0 Members and 1 Guest are viewing this topic.

royalT

    Topic Starter


    Starter

    Suppress msg from RENAME command
    « on: March 20, 2008, 11:19:29 AM »
    As part of a test setup that I am writing, I rename .ini files that the sw under test is uses and execute some tests.   I am writing a batch file to handle all of the file manipulations that have to be done during the test effort. 

    The following line:

    ren "C:\Test\LIB-SW\Product\*.ini" *.ini_

    generates the following prompt:

    Does C:\Test\LIB-SW\Product\TESt.ini  specify a file name or directory name on the target (F = file, D = directory)?

    I couldn't find any switches to suppress this message.  It seems obvious to me that it's a file since a file extension is included but I guess it's not.

    Does anyone know how I can eliminate this prompt?

    OS: XP Professional
    DOS: MS-DOS

    macdad-



      Expert

      Thanked: 40
      Re: Suppress msg from RENAME command
      « Reply #1 on: March 20, 2008, 12:01:51 PM »
      If you dont know DOS, you dont know Windows...

      Thats why Bill Gates created the Windows NT Family.

      royalT

        Topic Starter


        Starter

        Re: Suppress msg from RENAME command
        « Reply #2 on: March 20, 2008, 04:48:25 PM »
        Thx for taking the time to reply but the suggested link does not address my question.


        macdad-



          Expert

          Thanked: 40
          Re: Suppress msg from RENAME command
          « Reply #3 on: March 20, 2008, 04:51:39 PM »
          Quote
          Does C:\Test\LIB-SW\Product\TESt.ini  specify a file name or directory name on the target (F = file, D = directory)?
          yes.

          Quote
          Does anyone know how I can eliminate this prompt?
          there isnt a way to do this, ini files and other configuration files always bring up a warning prompt.
          If you dont know DOS, you dont know Windows...

          Thats why Bill Gates created the Windows NT Family.

          royalT

            Topic Starter


            Starter

            Re: Suppress msg from RENAME command
            « Reply #4 on: March 20, 2008, 05:04:56 PM »
            Quote
            there isnt a way to do this, ini files and other configuration files always bring up a warning prompt.

            I just executed the batch file on my personal computer (XP Home) and I did not receive the prompts as I did on my work PC (XP Professional).  So your assessment doesn't seem to be correct.  There is something more to this than meets the eye.  I'll keep investigating.  Thx for taking the time to reply.

            Anyone else have any ideas...?

            Also macdad, the quote below from the initial post was not a question posed to the forum for an answer.  It is the prompt that I'd like to eliminate.
            Quote
            Does C:\Test\LIB-SW\Product\TESt.ini  specify a file name or directory name on the target (F = file, D = directory)?



            Sidewinder



              Guru

              Thanked: 139
            • Experience: Familiar
            • OS: Windows 10
            Re: Suppress msg from RENAME command
            « Reply #5 on: March 20, 2008, 05:23:26 PM »
            You might try to pipe the response into the rename command:

            Code: [Select]
            echo D | ren "C:\Test\LIB-SW\Product\*.ini" *.ini_

            Feel free to change the D to F as the case may be.

            Good luck. 8)
            The true sign of intelligence is not knowledge but imagination.

            -- Albert Einstein

            royalT

              Topic Starter


              Starter

              Re: Suppress msg from RENAME command
              « Reply #6 on: March 20, 2008, 05:37:10 PM »
              Thx Sidewinder.  I read up a little bit about pipes and that looks like the answer to my problem.  I'll try it on my work machine tomorrow and post the results.