darg and drop: how to get short name of the parametre
Posted: 30 Oct 2006 16:10
Hello,
my BAT file test.bat contains:
and I get:
"C:\Documents and Settings\sam\Bureau\folderA"
if I drag the folder "folderA" located on the desktop (=Bureau in French) and drop it on the test.bat file.
My goal is to get only folderA, without the full path and without the double quotes.
Anyone could help me, please? Thank you.
my BAT file test.bat contains:
Code: Select all
set p1=%1
echo %p1%
pause
and I get:
"C:\Documents and Settings\sam\Bureau\folderA"
if I drag the folder "folderA" located on the desktop (=Bureau in French) and drop it on the test.bat file.
My goal is to get only folderA, without the full path and without the double quotes.
Anyone could help me, please? Thank you.