Page 1 of 1 1
Topic Options
#73722 - 2003-02-27 09:49 AM Parameters of DEL command don't work....
Luke van der Laan Offline
Fresh Scripter

Registered: 2003-02-27
Posts: 9
Hi,

I wanted to write a little script that deleted all temporary files from a user's profile. I use the following line:
del "c:\documents and settings\" + @USERID + "\*.tmp" /h /s

But the parameters for hidden files and subdirectories don't work. If I remove the parameters, it will delete only non-hidden files, and no files from subdirs. If I add the parameters, no files are deleted at all!

What's the problem, is it a bug, or have i made a syntax error?

Thnx...

Top
#73723 - 2003-02-27 09:52 AM Re: Parameters of DEL command don't work....
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Actually the solution of this was undocumented and Lonkero found it Yesterday ...

Try and change the path to the root folder were you want to delete recursively by using the CD command (KiX) before the DEL line

here a link : DEL /S /H

[ 27. February 2003, 09:54: Message edited by: jpols ]
_________________________



Top
#73724 - 2003-02-27 09:53 AM Re: Parameters of DEL command don't work....
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
that is not true.
but with /s you can't use foldernames.

see the beta-forum topic on del ( http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=3;t=000390 ) for more information.

it indeed works but not as expected.
no reply from ruud yet...
_________________________
!

download KiXnet

Top
#73725 - 2003-02-27 09:55 AM Re: Parameters of DEL command don't work....
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
'That is not true' -> to me ?
_________________________



Top
#73726 - 2003-02-27 10:00 AM Re: Parameters of DEL command don't work....
Luke van der Laan Offline
Fresh Scripter

Registered: 2003-02-27
Posts: 9
Hmmmm...

It seems to work, but the hidden temporary files aren't deleted at all. Seems like there's a problem with the DEL command, think we need an update...

Top
#73727 - 2003-02-27 10:19 AM Re: Parameters of DEL command don't work....
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
no j, to him.
_________________________
!

download KiXnet

Top
#73728 - 2003-02-27 10:26 AM Re: Parameters of DEL command don't work....
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
ahhh ...
_________________________



Top
#73729 - 2003-02-27 10:37 AM Re: Parameters of DEL command don't work....
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, there is fix (Release candidate)
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=3&t=000391
_________________________
!

download KiXnet

Top
#73730 - 2003-02-28 12:53 AM Re: Parameters of DEL command don't work....
Luke van der Laan Offline
Fresh Scripter

Registered: 2003-02-27
Posts: 9
Ok thnx the update works fine. But I have another problem, I also need to delete files from subdirectories in subdirectories. The command doesn't seem to support this...

Is there some other way to do this?

Top
#73731 - 2003-02-28 12:58 AM Re: Parameters of DEL command don't work....
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
this fix should work.

del "*.*" /s

should delete all files from all subdirectories recursively.
if it does not, please report.
_________________________
!

download KiXnet

Top
#73732 - 2003-02-27 01:02 PM Re: Parameters of DEL command don't work....
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
[Eek!] [Eek!] [Eek!]
_________________________



Top
#73733 - 2003-02-27 01:04 PM Re: Parameters of DEL command don't work....
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
lol... [Big Grin]
_________________________
!

download KiXnet

Top
#73734 - 2003-02-27 01:13 PM Re: Parameters of DEL command don't work....
Luke van der Laan Offline
Fresh Scripter

Registered: 2003-02-27
Posts: 9
Yeah, think it works. But I'm gonna do some more testing with it...
Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 774 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.063 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org