Add Existing File(s) To Project

This method will let you add one or more files from a single directory to your project. There is a faster method if you wish to add all files from a directory to a project.

1

Open the Add Files Dialog

In the Projects Window right click on the logical folder in the project tree where you want to add files and select Add Existing Item… from the popup menu.

AddFiles.png
Click image to enlarge.

2

Select File(s)

a

Select one or more files. The files need not reside in the project's directory. You can navigate to other directories if necessary.

b

Choose how the file's path should be stored in the project.
Relative: Path is relative to the project directory. This is usually best for files that reside inside the project directory. This allows the project folder to be moved anywhere while still maintaining a path to the files it contains.
Absolute: Path is the full, absolute system path (e.g. "C:\MTT\Hello.X\hello.c"). This is usually best for files that reside outside the project directory. This allows the project folder to be moved anywhere as long as the external files remain in the same location.
Auto: Choses path automatically. Uses relative for files inside the project directory and absolute for files outside the project directory.

c

If you select a file outside of the project directory, checking this box will copy the file to your project's directory and use the copy instead of the original file in its original location.


Click the Select button when done.

SelectItem.png
Click image to enlarge.

To choose multiple files, after clicking on one file hold down the Ctrl key and click on as many additional files as you want. To make it easier to select several files of the same type, select the file type from the Files of type combo box (d) at the very bottom of the dialog. This will filter the display to show only files of the selected type.

FilesOfType.png

3

You should now see the file(s) under the logical folder you originally right-clicked on to begin this process.

ProjectsWindow-End.png
Click image to enlarge.
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.