China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-09-29 05:39
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to add >nul 2>nul at the end of each line in a batch script View 2,862 Replies 17
Floor 16 Posted 2008-09-21 15:49 ·  中国 浙江 丽水 青田县 电信
新手上路
★
Credits 12
Posts 6
Joined 2008-09-10 21:13
18-year member
UID 125350
Gender Male
Status Offline
What does this sentence mean?
Floor 17 Posted 2008-09-21 16:21 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
What does 2>nul 1>nul in batch processing statements mean

http://www.cn-dos.net/forum/viewthread.php?tid=16942
Floor 18 Posted 2008-09-28 23:22 ·  中国 浙江 温州 乐清市 电信
新手上路
★
Credits 4
Posts 2
Joined 2008-09-26 04:59
18-year member
UID 126657
Gender Male
Status Offline
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"
Forum Jump: