Error “The syntax of the command is incorrect” when renaming a file

I get this error on this step of my SQL 2005 process:

rename "G:\AuthorsList\AuthorsList_New.mdb""G:\AuthorsList\AuthorsListCopy.mdb"

I am trying to rename the file. I have also tried this and get the same error:

rename "G:\AuthorsList\AuthorsList_New.mdb" "G:\AuthorsList\AuthorsListCopy.mdb"

How do I resolve this error?


Check the documentation for the rename command:

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. filename2: Specifies the new name for the file. If you use wildcards (* and ?), filename2 specifies the new names for the files. You cannot specify a new drive or path when renaming files.

The second parameter cannot be a path, it should contain only the new filename:

rename "G:\AuthorsList\AuthorsList_New.mdb" AuthorsListCopy.mdb

Need Your Help

Debugging NSArrayController bound to NSManagedObjectContext

objective-c cocoa core-data nsmanagedobjectcontext nsarraycontroller

I've an NSManagedObjectContext with two entities, A and B. I've an NSArrayController bound to the NSManagedObjectContext and an NSTableView. The NSArrayController is set to list entities of type B....

SQL server 2008 , add a column about the description of another column in a Table

sql sql-server sql-server-2008

I need to insert one column (varchar) from one table to another table on SQL server 2008.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.