I'm not much of a Windows user, but I have need to write a simple .bat script to automate building a folder from a file and a couple of other folders. I want to drag and drop a folder onto the .bat script to execute the script.
The problem is that many of the folder names will have the "^" sign in the name for the folder, and when I drag and drop such folders onto the .bat script the '%1" in the script has the folder name, but the '^' character is stripped out for some reason.
Is there a way to get the literal folder name without losing the '^' characters ?
I'm adding more info with the example. My .bat file is like:
@echo off
echo %~1
mkdir USB
xcopy /s radiantUSB USB
move "%~1" USB\
echo "FINISHED"
@pause
and the name of the folder I am dropping on the .bat file is:
Duck^Donald^Quack
and the path that it is extracting is:
C:\Users\sscotti\Desktop\DuckDonaldQuack
The '^' is removed and move "%~1" USB\ fails because it the path to the folder to move is incorrect.