中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-09 22:48
47,811 topics / 349,897 posts / today 2 new / 48,255 members
DOS批处理 & 脚本技术(批处理室) » How to add >nul 2>nul at the end of each line in a batch script
Printable Version  2,489 / 17
Floor16 zsyh9612 Posted 2008-09-21 15:49
新手上路 Posts 6 Credits 12
What does this sentence mean?
Floor17 HAT Posted 2008-09-21 16:21
版主 Posts 5,017 Credits 9,023
What does 2>nul 1>nul in batch processing statements mean

http://www.cn-dos.net/forum/viewthread.php?tid=16942
Floor18 doschinano1 Posted 2008-09-28 23:22
新手上路 Posts 2 Credits 4
taskkill /im explorer.exe /f >nul 2>nul

Use this:
@for /f "usebackq eol= delims=" %%a in ("%~f1") do @echo %%a ^>nul^ 2^>nul>> "%~dp1_%~nx1"
Prev  1 2
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023