Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello every1!!!
Look, I wanna make a batch file that deletes a file that the user type in.
----------
:file
set watitle=Select the file name.
set watext=Select the file that you hate here:
set wainput=All files (*.*);*.*
set waoutput=%userprofile%\Desktop
start /w wizapp FB FILE
if errorlevel 2 goto end
if errorlevel 1 goto select
call %wabat%
goto process:process
::process.exe -k explorer.exe
del %waoutput%
----------
wizapp is a program that makes dialog boxes and all that.
The file I want to delete is %waoutput%, which is stored in %temp%\wabat.bat.
But the path for that file has long filenames and the batch file doesn't recognize it!!! :(
I tried with a short filename and it worked.
I really want 2 make this program!!! :)
Thanx all!! ;)El-Trucha

Hi friend El-Trucha,
You do know that NT-based systems (WinNT/2K/XP) don't have DOS, don't you? And your batch file will not work in pure DOS either (e.g. start /w ..). Therefore, you'd better ask this question in WinXP Forum or Programming Forum, as the warning messages of this forum state.
---------------
Long Live DOS!

Yeah...I was looking 4 a DEL alternative with long filenames and environment variables...but I can't find any that works!!! :(
Do u know of any???
Thanx!!!PS: I will ask this question in those forums... ;)
El-Trucha

Hi El-Trucha,
DEL should work with LFN on a LFN-compatible system. However, if there are spaces in the long names, you should put quotation marks there, like:
DEL "%waoutput%"
---------------
Long Live DOS!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |