By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,133 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,133 IT Pros & Developers. It's quick & easy.

Changing file/folder names

P: n/a
Jay
What's the recommended way to change file/folder names within a project?

I want to change the solution name from (say) sol1.sln to sol2.sln, and also everything else named
sol1.* (eg sol1.suo, the folder sol1, and within this folder, sol1.csproj, and also, files within
Debug and Release folders)

Also, how do I change other names (eg .cs files)?

I'm using VS C# 2005 Express.
Feb 21 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Jay wrote:
What's the recommended way to change file/folder names within a
project?

I want to change the solution name from (say) sol1.sln to sol2.sln,
and also everything else named sol1.* (eg sol1.suo, the folder sol1,
and within this folder, sol1.csproj, and also, files within Debug and
Release folders)

Also, how do I change other names (eg .cs files)?

I'm using VS C# 2005 Express.
Use regual expressions in the terminal do it in seconds.
--
Regards JJ (UWA)
Feb 21 '07 #2

P: n/a
Hi,

Jay wrote:
What's the recommended way to change file/folder names within a project?

I want to change the solution name from (say) sol1.sln to sol2.sln, and also everything else named
sol1.* (eg sol1.suo, the folder sol1, and within this folder, sol1.csproj, and also, files within
Debug and Release folders)

Also, how do I change other names (eg .cs files)?

I'm using VS C# 2005 Express.
All the Solution and CSPROJ files are text files. The only non-text file
is the SUO file, but this stores only user information and can actually
be deleted without too many risks.

So in short: Search-and-replace all folder names, file names and all
file content, delete the SUO file, and you should be OK.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Feb 22 '07 #3

P: n/a
Jay
Thanks,

I was a little worried that changing the file names themselves may affect something (perhaps a file
lists the other files, so would reference non-existent files and cause an error) but if this isn't
the case, it looks like the solution.

Jay
"Laurent Bugnion [MVP]" <ga*********@bluewin.chwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi,

Jay wrote:
What's the recommended way to change file/folder names within a project?

I want to change the solution name from (say) sol1.sln to sol2.sln, and also everything else named
sol1.* (eg sol1.suo, the folder sol1, and within this folder, sol1.csproj, and also, files within
Debug and Release folders)

Also, how do I change other names (eg .cs files)?

I'm using VS C# 2005 Express.
All the Solution and CSPROJ files are text files. The only non-text file
is the SUO file, but this stores only user information and can actually
be deleted without too many risks.

So in short: Search-and-replace all folder names, file names and all
file content, delete the SUO file, and you should be OK.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Feb 22 '07 #4

P: n/a
Hi,

Jay wrote:
Thanks,

I was a little worried that changing the file names themselves may affect something (perhaps a file
lists the other files, so would reference non-existent files and cause an error) but if this isn't
the case, it looks like the solution.

Jay
You got me wrong. The CSPROJ files are listed in the solution file, but
since they're all text, you can change the names everywhere and it will
work.

Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Feb 22 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.