看板Programming
標 題Re: [問題]DOS Batch File Proramming 相關問題
發信站SayYA 資訊站 (Mon Oct 30 10:07:38 2006)
轉信站ptt!ctu-reader!news.nctu!SayYa
※ 引述《[email protected] (涼宮春日症候群)》之銘言:
> 我的做法是在b.bat裡設結果到環境變數
> 在a.bat裡call了之後用環境變數接回來
> ex:
> rem b.bat
> @echo off
> rem do some work
> set BResult=someresult
> rem a.bat
> @echo off
> rem do some work
> rem calls b.bat
> call b.bat
> rem gets result
> echo %BResult%
那如果"someresult"的結果本身就是來自於command的結果呢,
怎麼把command的結果設定到BResult呢?
--
※ Origin: SayYA 資訊站 <bbs.sayya.org>
◆ From: 220-130-194-251.hinet-ip.hinet.net