How can I create a "dotfile" on Windows with custom functions to run in command prompt (not PowerShell)? A related question is, where should I save the file? There are a ton of resources for this for bash/unix, but I haven't found anything clear on (1) syntax for windows cmd prompt custom functions; or (2) where/how to save functions so that they automatically load (and can be backed up like dotfiles for easy configuration on new machines).
An example function I'd like to have is adding a prefix string to all files in a folder. I am tired of typing for %a in (*) do ren "%a" "prefix_%a"
many times a day. Thank you for any help.