Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I was pretty good in DOS, but I'm lost in XP.
This works fine:
@ echo Press the Y key and then press Enter
@del "C:\Documents and Settings\All Users\Application Data\avg8\Log\*.*">nulThis does not:
@del "C:\Documents and Settings\All Users\Application Data\avg8\Log\*.*"<c:\y.txt
Where Y.txt contains YThe Y is redirected to the del command, but files are not deleted.
Why?

RM,
You're quite right that XP is different from DOS in many important ways.
For both DOS & XP [NT5x], some commands will take a pipe or redirect and some won't.
In the case of DEL, NT has a built-in switch:
/Q Quiet mode, do not ask if ok to delete on global wildcard
[del /?]
=====================================
Helping others achieve escape felicityM2

Yeah, reverse redirection does not always work, even on standard commands. Do check that you input command contains an enter (after the text you want to give it), this may be a reason why it fails as well.

Back to the original question,
The Y is redirected to the del command, but files are not deleted.Why?
Presumably, your 'y.txt' has just a "Y", and no trailing Enter.

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |