Following this response: Org-Mode - How do I create a new file with org-capture
https://stackoverflow.com/questions/11902620/org-mode-how-do-i-create-a-new-file-with-org-capture?
I am trying to make this piece of code work, but I get the error: invalid file location: nil.
(defun capture-report-date-file (path)
(let ((name (read-string "Name: ")))
(expand-file-name (format "%s-%s.txt"
(format-time-string "%Y-%m-%d")
name) path)))
(setq org-capture-templates
'(("t"
"todo"
entry
(file (capture-report-date-file "~/path/path/name"))
"* TODO")))