From long ago and not so long ago DOS experience, when the batch file is called, have the user specify the full path of the file to be deleted
BATDelete C:\Documentsandsettings\user
And the .BAT file would contain:
ECHO OFF
DEL %1
But that then raises some questions.
What if the file doesn't exist?
What if the user of the .BAT file specifies the wrong file? Shouldn't we give the user the responsibility to verify and affirm the file to be deleted? The DOS delete in .BAT files does not place the file in trash - the file just dissapears!
So, using the same batch file call, lets improve what happens:
ECHO OFF
IF EXIST %1% goto XX1
ECHO.
ECHO File %1 does not exist
echo.
GOTO XXX
:XX1
Echo.
echo File %1 Is this the file you want to delete
ECHO Press any key to delete this file.
ECHO Press CTRL-C to terminate without deleting.
PAUSE
DEL %1
:XXX
To learn more about DOS and BATCH files (which work in WindowsXP, do a GOOGLE search for "batch file parameters" without the quotes as an EXACT search in Google.com/advanced_search
Chris C