Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
command output to variable.urgent!
Name: dosnew Date: March 19, 2007 at 00:20:31 Pacific OS: windows xp CPU/Ram: p4/2GB Product: intel
Comment:
when i run this cmd thru batch file iam getting error " | was unexpected this time".the code is follows. For /F "Tokens=* delims=" %%I in ('attrib.exe /s c:\eInsolvensi\log\*.* | find /C /V') Do Set RR=%%I echo %RR%
Name: orbital Date: March 19, 2007 at 02:03:04 Pacific
Reply:
I believe you have stumbled into the wrong Forum as XP has NT Command Prompt not MS-DOS Prompt, therefore it may illicit a better answer in the XP or Programming Forum !
0
Response Number 2
Name: IVO Date: March 19, 2007 at 02:43:35 Pacific
Reply:
orbital is right, but if your need is so urgent, prefix the | with the caret symbol, i.e. ^|.
And beware the Find command wants a search string expressed to run.
0
Response Number 3
Name: Mechanix2Go Date: March 19, 2007 at 05:03:10 Pacific
Summary: Hum... In order to redirect the output to a FILE, instead of displaying it, do: command > file.ext e.g.: dir > data.txt Then you could use something like this: @echo off echo Below are the results of ...
Summary: Hi: I am trying to write a dos batch file that will redirect the output of a command to a variable. There really doesn't seem to be a good way of doing this. If anybody has a clue as to how to call ...
Summary: How do I get the output of the date command into a variable in a batch file? Also can anyone recommend a good, reliable, scheduler. The at command doesn't seem to be included in DOS 6.22. ...