Skip to main content

Create Files

cpbooster provides the create command or its alias c, to create one or several source files with your template preloaded in each of them.

cpb create <filePath>

or to create multiple files (using alias c to shorten the length of the command)

cpb c [path/]{start-end}.<extension>

Demo#

test

Usage Examples#

  • cpb create a.py creates single file with the corresponding template loaded based on file extension
  • cpb create {a..n}.cpp creates multiple consecutive files from "a.cpp" to "n.cpp"
  • cpb create {a...n}.cpp same as previous command (Any amount of dots greater than 1 work)
  • cpb create {a-n}.cpp same as previous command (Single dash also works)
  • cpb create /some/path/a.cpp creates "a.cpp" in the specified path instead of current location
  • cpb create /some/path/{a-n}.cpp creates "a.cpp ... n.cpp" in the specified path instead of current location