If I have multiple files in a directory and want to append something to their filenames, but not to the extension, how would I do this?
(如果我在一个目录中有多个文件,并且想要在文件名中附加一些内容,但不希望在扩展名中附加一些内容,我该怎么做?)
I have tried the following, with test files file1.txt
and file2.txt
:
(我已经尝试了以下测试文件file1.txt
和file2.txt
:)
ren *.txt *1.1.txt
This renames the files to file1.1.txt
and file2.txt1.1.txt
(这会将文件重命名为file1.1.txt
和file2.txt1.1.txt
)
I want the files to be file1 1.1.txt
and file2 1.1.txt
(我希望文件为file1 1.1.txt
和file2 1.1.txt
)
Will this be possible from cmd or do I need to have a bat file to do this?
(从cmd可以做到这一点还是我需要一个bat文件来做到这一点?)
What about PowerShell? (那PowerShell呢?)
ask by Morne translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…