Adds all files

The variable `curcard` is not available in the scope of this function. It should either be set as a global, or passed to this function as an argument.