Exclude files using the .bbwpignore file

When you use the BlackBerry WebWorks Packager to package your app via its folder location, you might not want all the files in that location to be bundled and packaged. You can use a .bbwpignore file to specify files and patterns to ignore during the packaging process. If you're familiar with the .gitignore file, you'll find that the .bbwpignore operates similarly.

The .bbwpignore file must sit in the root of your application folder.

The rules and syntax for the .bbwpignore file are as follows:
  1. A leading slash ( / ) matches the beginning of the pathname (for example, /*.c matches cat-file.c but not mozilla-sha1/sha1.c).
  2. If the pattern does not contain a slash ( / ), it will be treated as a global pattern and *.c will match all files in root and subdirectories.
  3. Directories must end with a slash ( / ).
  4. A line starting with a hash symbol ( # ) acts as a comment.
  5. Blank lines are ignored.
  6. The exclamation mark ( ! ) which negates the pattern is not supported.

Here's an example of a .bbwpignore file:


And here's what each line indicates:
  • Line 1: Ignore all .zip files that are in root directory.
  • Line 2: Ignore all .c files that are in the root directory and in the subdirectories.
  • Line 3: Ignore the device folder.
  • Line 4: This is a comment, and nothing occurs.

When you compile your application, the command syntax is:

bbwp [drive:][path][-o dir]


bbwp C:\apps\HelloWorld -o C:\apps\output

Note: For Windows users, if you use quotation marks in your path, do not end the path with a backslash ( \ ) because that character escapes the last quotation mark. For example, use bbwp "C:\apps\HelloWorld" instead of bbwp "C:\apps\HelloWorld\".

Last modified: 2014-03-10

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus