PC Review


Reply
Thread Tools Rate Thread

Changing file/folder names

 
 
Jay
Guest
Posts: n/a
 
      21st Feb 2007
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.


 
Reply With Quote
 
 
 
 
j1mb0jay
Guest
Posts: n/a
 
      21st Feb 2007
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)
 
Reply With Quote
 
Laurent Bugnion [MVP]
Guest
Posts: n/a
 
      22nd Feb 2007
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
 
Reply With Quote
 
Jay
Guest
Posts: n/a
 
      22nd Feb 2007
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]" <galasoft-(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
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


 
Reply With Quote
 
Laurent Bugnion [MVP]
Guest
Posts: n/a
 
      22nd Feb 2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Match file names listed in column with file names in folder K Microsoft Excel Programming 1 16th Mar 2009 04:26 PM
Re: file names and folder names have been changed into some values automatically Malke Windows Vista File Management 0 11th Jul 2008 01:10 PM
changing user folder names =?Utf-8?B?bG9zdCBpbiB2aXN0YQ==?= Windows Vista Administration 1 2nd Jul 2007 02:56 PM
Changing Multiple File/Folder Names Rob.T Windows XP Customization 4 1st Oct 2006 05:48 AM
Changing Multiple File/Folder Names Rob.T Windows XP 1 30th Sep 2006 06:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:27 PM.