全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 Excel
1245 7
2014-03-17
悬赏 5 个论坛币 已解决
Hi :
My question: I have many excel files on c:\temp\A0001.xls…..A1000.xls
I want to use Excel to rename A0001.xls…..A1000.xls to B0001.xls…..B1000.xls
ie. (rename B0001.xls= A0001.xls ….. B1000.xls=A1000.xls)
Thanks !

最佳答案

jjjj6666 查看完整内容

yes, basical, make a text file named as rename.bat and put under c:\test, then under ms_dos, c: cd c:\test rename
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-3-17 09:05:34
yes, basical, make a text file named as rename.bat and put under c:\test, then under ms_dos,

c:
cd c:\test
rename
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-3-21 11:55:52
put this in a dos batch file and run it

@ECHO OFF
SETLOCAL enabledelayedexpansion
FOR /l %%i IN (1,1,1000) DO (
        SET newname=000%%i
        SET newname=!newname:~-4!
        IF EXIST a!newname!.xls (
                ECHO REN a!newname!.xls b!newname!.xls
                REN a!newname!.xls b!newname!.xls
        )
)

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-3-21 14:14:06
Sir :
Can you tell in detail about : " put this in a dos batch file"
means to  open windword 2010 program  then creat a new macro ?
I really don't underrtsnd what is your means?
Sincerly !
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-3-21 23:19:32
open a notepad, copy them into the notepad, save the notepad into a file named, say, rename.bat, under the folder you have your excel files, and then open a dos command, change to that folder, enter "rename" and hit enter to execute the command.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-3-21 23:39:36
You meams is cut rename.bat paste into my excel directlory :C:\test\..xls,
then under MS_DOS (c:\) keyin rename to excute
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群