###查看共享网络 net view \\192.168.10.106 ###映射网络位置到本地Z盘 net use Z: \\192.168.10.100\hexo #注意中间空格 ###断开网络映射 net use Z: /del ###重置所有网络驱动器 net use * /d /y
dir导出命令
快速把目录下的文件名导入到EXCEL或者TXT文件里面去
1 2
dir /b >a.excel dir /b >b.txt
给电脑配置静态IP地址
1 2 3 4 5 6 7 8 9 10
@echo off netsh interface ip set address "以太网" static ip地址 子网掩码 网关 echo ('静态地址配置成功') netsh interface ip set dns "以太网" static 8.8.8.8 echo ('静态DNS配置成功') netsh interface set interface "以太网" disabled echo ('禁用网卡') netsh interface set interface "以太网" enable echo ('重启网卡') pause
给电脑配置动态IP地址
1 2 3 4 5 6 7 8 9 10
@echo off netsh interface ip set address "以太网" dhcp echo IP地址dhcp开启成功 netsh interface ip set dns "以太网" dhcp echo DNS地址dhcp开启成功 netsh interface set interface "以太网" disabled echo 禁用以太网卡 netsh interface set interface "以太网" enable echo 启用以太网卡 pause