Op 28-1-2012 19:47, kurt godel schreef:
> Sorry, hit the wrong key; made this batfile in freedos 1.1:
>
> cd \
> cd tag
> dir >dmyy.txt
> cd \
> cd djgpp
> cd bin
> copy c:\tag\dmyy.txt  c:\djgpp\bin\dmy.txt
>
> Ran perfect; then changed it:
>
> cd \
> cd djgpp
> dir>dmyy.txt
> cd \
> cd djgpp
> cd bin
> copy c:\djgpp\dmyy.txt c:\djgpp\bin\dmy.txt

Likely DIRCMD environment variable has a "/P" somewhere to pause on each 
full page of text. Enter SET to display the list of variables, and 
change DIRCMD by entering SET DIRCMD=/-p

Alternatively a DIR /-P also works

My use to locat the first valid file I want to search for, for example is:
@ECHO OFF
SET /E RESULT=DIR /S /-P C:\MYFILE.BAT
IF EXIST %RESULT% echo First result: %result%
IF NOT EXIST %RESULT% echo File wasn't found
SET RESULT=

(and the IF EXIST is to handle the feedback by DIR, as it returns text 
even in case no file was found)

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to