我在 SQL 2005 进程的这一步遇到了这个错误:
rename "G:\AuthorsList\AuthorsList_New.mdb""G:\AuthorsList\AuthorsListCopy.mdb"
我正在尝试重命名文件。我也试过这个并得到同样的错误:
rename "G:\AuthorsList\AuthorsList_New.mdb" "G:\AuthorsList\AuthorsListCopy.mdb"
如何解决此错误?
最佳答案
查看 rename 的文档命令:
Syntax
rename [Drive:][Path]filename1 filename2
Parameters
[Drive:][Path]filename1
: Specifies the location and name of the file or set of files you want to rename. FileName1 can include wildcard characters (* and ?).
filename2
: Specifies the new name for the file. You can use wildcard characters to specify new names for multiple files.
第二个参数不能是路径,它应该只包含新文件名:
rename "G:\AuthorsList\AuthorsList_New.mdb" AuthorsListCopy.mdb
关于windows - 重命名文件时出现错误 "The syntax of the command is incorrect",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20105735/