How to use ~ in a Cmd

Call expanduser on the path first.