syntax for deletion of local file from win2k during logon

D

Dan Sime

Hi

Interesting one. I have had a similar one just
recently. The logon script had to delete a log file but
i was using 'del file.ext' within the novell logon script
itself. As del is not a program of its own, i was having
a bit of a problem. I ended using the del command within
a batch file, then calling the batch file.

From the way you've done it, it looks spot on. I assume
you've done some
like '#\\servername\sys\public\batchfile.bat' in the
logon script?


It might be to do with permissions on the file you are
trying to delete.

It might be to do with the file being 'in use' (i.e. is
it related to a service that is running?).

Alternatively, the command prompt might be starting
further down the directory structure. For example, if
the command prompt starts at c:\winnt\system32\subfolder\,
then
cd..
cd..
will only take you back as far as c:\winnt. You then
start trying to cd progra~1, and of course, it will
fail. It might be worth replacing all of the cd.., with
a single 'cd\'. That will return you to C: instantly (or
the letter of the current drive).

for example:
cd\
cd progra~1
cd targetfolder
del file.ext

This will ensure that on both the Windows 9x and Win2K
machines, the batch file begins at c:\

Hope it helps.

Dan

P.S. You mentioned about the Pause.... great for testing
it. Also, you could start with 'echo on', to make sure
you see all errors that are reported.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top