**I am running the following command,**

```
set /p "filepath=Drag and drop your file >" 
cls 
for %%a in ("%filepath%") do echo %%~nxa
pause >nul

```

It works good when the file name is single word. But, it doesn't works when the file name or folder name is multiple words containing space in between.

**Example & Output am getting running above code is,**

**(1)** if input path is `D:\folder\folder\file.txt` then, the output is,

```
file.txt

```

**(2)** if input path is `D:\folder\folder name\file name.txt` then, the output is,

```
folder
file
name.txt""

```

**But, Expected Output for (2) is,**

```
file name.txt

```

Kindly help me to fix my code.