I’m writing a build script, and if the directory the user’s building the script contains spaces, everything falls apart. To go around that, I thought of using 8.3 filenames so that drive:\Documents and setttings\whatever becomes drive:\Docume~1\whatever . The current directory can be found by querying the environment variable %CD%.
How do I transform %CD% into a short file path?
Edit: don’t forget to use %% if you are using it in batch file. like this
On my machine:
Other options:
In addition, substitution of FOR variable references has been enhanced.
You can now use the following optional syntax: