The Database Managers, Inc.

Contact The Database Managers, Inc.


Use an RSS enabled news reader to read these articles.Use an RSS enabled news reader to read these articles.

How to change the default save directory in the CB2010 IDE?

by Curtis Krauskopf

Q:  The first time I save a project, it always tries to put it in My Documents\RAD Studio\Projects, which I never use.

A:  There are three solutions, depending on how badly you want to override the default.

Here's a quick example so you can follow along in your own IDE.

Create a small project

  1. Launch CB2010.
  2. Add a static library to the default ProjectGroup1. It doesn't matter what you add but for this example, we'll use a static library.
    Choose File -> New -> Other
  3. In the New Items dialog box, choose C++Builder Projects from the left-hand selection tree and then select Static Library from the right-hand panel.

  4. In the Project Manager panel, right-click the Project1.lib and choose Add New -> Unit.

    changes to...

  5. Right-click on ProjectGroup1 and choose Save Project Group. A "Save Unit 1 As" dialog box will appear. Its default folder will be Desktop/My Documents/RAD Studio/Projects.
  6. Either left-click on the File name box or use Alt+N to use the shortcut.
  7. Enter the name of the drive and folder you want to use.
  8. While navigating, you can use the Create New Folder icon to create a destination folder.

  9. Once you've found the location you want to save the library's CPP file, name the file Library.cpp and then click on the dialog's Save button.
  10. A Save Project1 As dialog box appears. Save the project into the same folder.
  11. A Save ProjectGroup1 As dialog box appears. Save the project group into the same folder.

First Tip

So far, all of the steps have been the same as when you are saving a regular project. The first tip is that you can use the My Recent Document shortcut on the save panel to quickly go back to the folder you previously chose. To see that tip in action, follow these steps:

  1. In Project Manager, right-click on ProjectGroup1 and choose Add New Project.
  2. Add another static library to the project.
  3. Right-click on the new Project1.lib and choose Save.
  4. The Save Project1 As dialog defaults to the Desktop/My Documents/RAD Studio/Projects folder. Click on the My Recent Document icon on the shortcuts tray. A list of the folders and documents you've recently worked on will appear. The list defaults to being sorted by chronological order, but you want the most recent folders first.

  5. Click on the Date Modified title to resort the list in reverse chronological order.
  6. The folder you want should be at or near the top of the list.

Second Tip

Another way to quickly navigate to your work folder is to put a shortcut to the work folder in the Desktop/My Documents/RAD Studio/Projects folder.

  1. When saving a project, right-click anywhere in the white space in the main panel of the Save Project1 As dialog box. A context menu appears.
  2. Choose New -> Shortcut. The Create Shortcut wizard appears.
  3. Follow the panels in the Create Shortcut wizard to make a shortcut to your project folder.

Third Tip

CB2010 has a way to permanently change the default folder that is used for saving projects.

  1. In the CB2010 IDE, choose Tools -> Options. The Options panel appears.
  2. The Options panel defaults to whatever panel was previously chosen. On the left-side of the panel, navigate to the Environment Options. It is the first branch at the top of the options tree.
  3. At the bottom of the Environment Options panel is a Default project data entry field. Either enter the name of the project folder or select it using the folder picker (...) to the right of the Default project field.

  4. Click on the Ok button at the bottom of the form to save your change.

All future saves will default to the folder specified in the Default project data entry field.

Conclusion

There are three ways to easily navigate to your project folder. I have presented three ways so that you can choose whichever technique best fits your work style and work environment.

The techniques are to:

  1. Use the My Recent Document icon in the shortcut tray
  2. Create a shortcut to your work folder
  3. Specify the default work folder in the CB2010 IDE
Copyright 2003-2010 The Database Managers, Inc.

Popular C++ topics at The Database Managers:

C++ FAQ Services | Programming | Contact Us | Recent Updates
Send feedback to: