Code::Blocks Forums

User forums => Help => Topic started by: Chay Hawk on September 04, 2013, 04:32:04 am

Title: How to change .h and .cpp file name while in editor
Post by: Chay Hawk on September 04, 2013, 04:32:04 am
Hi i have been using code blocks for a while and i was wondering if there was a way to change the file name in the editor because i named some oddly and i want to change them and i dont want to delete the file. I have never had any need for multiple files up until now so i am not familiar with a method to change their names.
Title: Re: How to change .h and .cpp file name while in editor
Post by: ToApolytoXaos on September 04, 2013, 07:36:16 am

That's it.
Title: Re: How to change .h and .cpp file name while in editor
Post by: bangorme on July 16, 2014, 01:46:51 am
I'm having some real problems with the naming of files within a project and organizing them.  For example, in my project I have a "main" template where int main() goes.  I want to rename it.  So I follow the directions here and close the file, right click the "main" file, rename it.  Instead of  just  renaming it, C::B creates a virtual folder and puts the file in there.  Unfortunately,  C::B doesn't treat files there  like regular files and basically turns into notepad.  So, I try to rename it back to "main", and it doesn't move back into the project srv folder, but still sits in the virtual folder.  So, I go into file manager and manually move it into the correct folder, restart C::B, and C::B moves it right back into the virtual folder.  There it sits.   So, I'm wondering if there exists a clear explanation for how C::B handles files, (specifically renaming, project folders, virtual folders, C::B treatment of files in virtual folders, etc) because this is a recurring problem with other files I've created.  Any help would be appreciated.

Thanks


O.S. Fedora
Ver: SVN 9844
Title: Re: How to change .h and .cpp file name while in editor
Post by: stahta01 on July 16, 2014, 02:06:45 am

SNIP

O.S. Fedora
Ver: SVN 9844

Any Fedora or other Linux users able to duplicate this problem?
On Windows 7 32 bit, I do NOT see this issue with self built SVN Trunk ( wx2.8 ).

Tim S.
Title: Re: How to change .h and .cpp file name while in editor
Post by: BlueHazzard on July 16, 2014, 02:09:38 am
You have to add a extension, like .cpp or .h to your file...

greetings

[Edit:] c::b use the extension to differentiate between the files and move them in the right directory...