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

Author Topic: help with that *.*  (Read 4131 times)

0 Members and 1 Guest are viewing this topic.

_VIROX_

    Topic Starter


    Starter

    • Experience: Expert
    • OS: Windows 7
    help with that *.*
    « on: October 14, 2013, 08:32:01 AM »
    Hello,
    It is my first post .

    i made Batch file but i have problem

    i have file named virox.txt

    i made Batch with this commands


    @echo off
    Echo. > virox.txt

    this commands clears virox.txt content

    if i make commands like that :
    @echo off
    Echo. > *.txt

    it doesn't work.

    if i made it like that :

    @echo off
    Echo. > *.*

    it doesn't work also.

    i'm using it to clear contents of txt,dat,biz and doc files and type new content

    i want to make that with one command .
    i want to use *.* with Echo. Command .

    Many Thanks .

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: help with that *.*
    « Reply #1 on: October 14, 2013, 10:15:44 AM »
    Quote
    Echo. > *.txt
    Is always wrong.
    File redirection must have a single target.
    The expression  *.TXT could mean one file, or a thousand files. It is to be used in command that can have multiple targets.

    D:\>cd dos

    D:\DOS>Echo. > *.txt
    The filename, directory name, or volume label syntax is incorrect.

    D:\DOS>


    What is it you want to do?

    Salmon Trout

    • Guest
    Re: help with that *.*
    « Reply #2 on: October 14, 2013, 11:46:11 AM »
    Quote
    i'm using it to clear contents of txt,dat,biz and doc files and type new content

    for %%A in (*.txt *.dat *.doc) do echo. > %%A

    _VIROX_

      Topic Starter


      Starter

      • Experience: Expert
      • OS: Windows 7
      Re: help with that *.*
      « Reply #3 on: October 14, 2013, 12:23:06 PM »
      Is always wrong.
      File redirection must have a single target.
      The expression  *.TXT could mean one file, or a thousand files. It is to be used in command that can have multiple targets.

      D:\>cd dos

      D:\DOS>Echo. > *.txt
      The filename, directory name, or volume label syntax is incorrect.

      D:\DOS>


      What is it you want to do?


      this is my problem ...

      Many Thanks for your reply

      _VIROX_

        Topic Starter


        Starter

        • Experience: Expert
        • OS: Windows 7
        Re: help with that *.*
        « Reply #4 on: October 14, 2013, 12:24:03 PM »
        for %%A in (*.txt *.dat *.doc) do echo. > %%A

        Many Thanks man..

        This Command works with me ,,,

        Many Thanks again ...