This is the code that I have in order to change the file names in a directory, but I must provide the full name of the file and then the new name.
I need changes to the code so that it must loop through all the files located in 'C:\MyFiles\' and just remove any apostrophes in the file names.
(comments are locked)
|
How about this
I am sure this can be more optimized and could be more tidier. But this could lead to the solution. I also hope that you know the consequences and pitfalls of using extended procedures like xp_cmdshell etc.
(comments are locked)
|
This is for db. ALTER DATABASE your_db_name MODIFY FILE (NAME = logical_file_name, FILENAME = 'your-new-file-on-disk.mdf' why do you want to do this: I need changes to the code so that it must loop through all the files located in 'C:MyFiles' and just remove any apostrophes in the file names.
Jun 28, 2012 at 11:25 AM
ecomma
do just want to change the default location of SQL Server Data and Log files?
Jun 28, 2012 at 11:26 AM
ecomma
(comments are locked)
|