I want to write a script that move files which dropped on it to somewhere. So this is how my batch code goes:
@echo off
for %%i in (%*) do move "%%~i" "somewhere\%%~nxi"
pause
Then I find that when I drop a file with the name that contains ')' and does not contain a space (eg. fig(1).jpg
) it will report an error that says "There should be no .jpg)".
I know that it is fine if I write ./xxx.bat "fig(1).jpg"
in terminal straightly, but I do need to drop some files on it. any help?