【发布时间】:2020-01-19 17:45:32
【问题描述】:
我正在尝试创建一个批处理文件来创建文件夹并将文件放置在这些文件夹中。我已经完成了,但我现在想将文件重命名为一个设置变量(项目的名称)
我已经尝试过重命名功能。
@echo off
SET x="Project Name"
md %x%\"Bid Proposals"
md %x%\"Reports"
md %x%\"Drawings"
md %x%\"Specifications"
md %x%\"Addendums"
cd /d K:\ESTIMATING\2019 ESTIMATING\2019 BID-PROPOSALS\%x%\Bid Proposals
copy "filelocation\Bid Proposal - Template.docx"
rename "Bid Proposal - Template" "%x% - Bid Proposal"
我希望它使用变量将文件重命名为项目名称。
它复制并放置文件,但不重命名。
【问题讨论】:
标签: batch-file variables rename