联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@For %%a in (C D E F G H I J K) do @if Exist %%a:\nul echo %%a: >>s.txt type s.txt
Originally posted by lxmxn at 2007-7-6 07:08: 试试这个: @For %%a in (C D E F G H I J K) do @if Exist %%a:\nul echo %%a: >>s.txt type s.txt
Originally posted by haiou327 at 2007-7-6 23:30: 这样如何 @echo off echo 你的计算机可用分区如下:>s.txt @For %%a in (C D E F G H I J K) do @if Exist %%a:\nul echo %%a:>>s.txt type s.txt ping -n 3 127.1 >nul
Originally posted by haiou327 at 2007-7-6 11:30 PM: 这样如何 @echo off echo 你的计算机可用分区如下:>s.txt @For %%a in (C D E F G H I J K) do @if Exist %%a:\nul echo %%a:>>s.txt type s.txt ping -n 3 127.1 >nul
@echo off setlocal enabledelayedexpansion echo 本地所有的磁盘为: for /f "tokens=*" %%i in ('fsutil fsinfo drives ^| find /v "拷"') do ( for /f "tokens=1* delims=\" %%j in ("%%i") do ( set tmp=%%j echo !tmp:~-2! ) ) pause
Originally posted by zhansi at 2007-7-8 19:28: 我用这个试了可以啊! 然后我再试了第10的也是可以啊 ,它把一般的磁盘都列出来啊! Last edited by zhansi on 2007-7-8 at 07:37 PM ]
Originally posted by Vampire at 2007-7-8 21:17: @echo off setlocal enabledelayedexpansion echo 本地所有的磁盘为: for /f "tokens=*" %%i in ('fsutil fsinfo drives ^| find /v "拷"') do ( for /f "tokens ...
@echo off setlocal enabledelayedexpansion echo 本地所有的磁盘为: for /f "tokens=*" %%i in ('fsutil fsinfo drives ^| find /v "拷"') do ( for /f "tokens ...