Blogger Information
Blog 8
fans 0
comment 0
visits 8023
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
三个常用的bat命令收藏
并向你招手祥子
Original
1206 people have browsed it

代码如下:

1.批量去除文件名中空格

@echo off
Setlocal Enabledelayedexpansion
set "str= "
for /f "delims=" %%i in ('dir /b *.jpg') do (
set "var=%%i" & ren "%%i" "!var:%str%=!")

其中

*.jpg

可以修改为其他后缀或者

*.*

2.bat重命名文件

ren 原文件名.后缀 新文件名.后缀

注意,使用ren命令,文件名中不能有空格

3.导出当前目录所有文件名到表格

dir /b>当前目录所有文件名.xls


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post