1.

Solve : help with that *.*?

Answer»

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 .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?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. > %%AQuote from: Geek-9pm on October 14, 2013, 10:15:44 AM
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 Quote from: Salmon Trout on October 14, 2013, 11:46:11 AM
for %%A in (*.txt *.dat *.doc) do echo. > %%A

Many Thanks man..

This Command works with me ,,,

Many Thanks again ...


Discussion

No Comment Found