I apologize if the question title is a bit confusing, but I wanted to keep it short.
Basically what I want to do is take the system date format (%DATE%) and replace characters that would be bad in the command or illegal in file names; for example, spaces and slashes.
The environment I'm doing this in is limited, however. This is running through a service that performs a single line of commands on the client's machine. This means that I can't use variables (to my knowledge) to do it in multiple steps, as everything I've tried is unable to see a variable created on the same line (when using & and && to link commands together). Batch files are also pretty much out of the question, as it could be a struggle to get some of our clients to put a batch file on their system.
Right now, I have the command set up like the following:
MOVE C:\folder\file.csv C:\archive\^"file%DATE:/=-%.csv^"
I was wondering if there was some way to have multiple character replacements in the %DATE:/=-% part.
Currently, the quotes are fixing issues with spaces in the format, and I'm replacing slashes with dashes. I'm hoping that this will be enough to fix any issues, as I don't know why they would have any other illegal characters in their date format, but I figured I'd ask to be prepared in case we have another issue in the future. Feel free to ask for clarification on anything that may be confusing.