Page 1 of 1

Batchfile with dir <in.txt >out.txt makes always ERROR

Posted: Wed Mar 12, 2003 9:51 am
by Elektronikfreak
I use Textpad since last week. Everything works well, but one problem ocours:

I use some Batchfilse to compile and Link Files.
If I use a Batchfile with e.g.:
dir <in.txt >out.txt

This means "DIR" get the parameters and put the output in the file "out.txt"

From Dos oder Win Explorer it works as it should.

But with Notepad as Tool it makes a error form the Operatin System with something like
C:\TEMP>dir 0<in.txt 1>out.txt
Die Zugriffsnummer konnte nicht ge�ffnet werden,
w„hrend die Zugriffsnummer 0 umgeleitet wurde.
(It is German, it mean that output could not find place while input is routet)

Is there a solution for this problem?

Thanks!

Posted: Wed Mar 12, 2003 8:29 pm
by Berend Hasselman
Which Operating system (Win95/98/2000/NT)?
Notepad as tool?

Since it is not clear what you are trying to do, it would be helpful if you explain exactly what you are trying to do in Textpad.

What I do...

Posted: Thu Mar 13, 2003 7:28 am
by Elektronikfreak
I use Windows NT 4.

If you would like to try it on a other OS:
make a .bat file with:
dir <in.txt >out.txt

make a file in.txt with
/w

the Batch file will make a DOS Command like
"dir /w"
and save the output in file out.txt

I have a Compiler for Microcontroller and there we use since years this art of BATCH Files. Not with "dir /w". We use it for some linkerscripts.

Notepad is very powerful, if it works with our old Batches (with some changes) our department will buy some licences.

Thanks

Output

Posted: Thu Mar 13, 2003 7:32 am
by Elektronikfreak
I call this BATCH from Textpad and get this error:

----
C:\TEMP>dir 0<in.txt 1>out.txt
Die Zugriffsnummer konnte nicht ge�ffnet werden,
w„hrend die Zugriffsnummer 0 umgeleitet wurde.

Prozess beendet mit Exit-Code 1
----

If i start it from DOS it works fine.

Posted: Thu Mar 13, 2003 7:27 pm
by Berend Hasselman
Under Windows 98 this works fine.
I cannot test with Windows NT.

By the way, in Windows 98 you can't pass arguments to dir from a textfile.

Posted: Mon Mar 17, 2003 11:58 am
by Elektronikfreak
Thats right, we can not pass arguments to "DIR"

But the Programm to wich I pass the IN File is not from the OS, so you can not test it.

If I understand right, it is a programm which gets the input not from keyboard but from the IN File.

To test it unter Win98 we need a Programm, which get the input from Keyboard and which is able to terminate from the IN File ( EOF??).

Do you know a programm to test it?