Page 1 of 1 1
Topic Options
#207164 - 2013-04-22 08:45 PM RD broken?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the board search refuses to search for RD, which is understandable.

anyways, is RD working for any one in here?
I want to destroy a directory tree and del /r removes all the files in it, but RD /s fails to do anything.
am I missing something?

I've been using wkix32 4.62
_________________________
!

download KiXnet

Top
#207165 - 2013-04-22 09:05 PM Re: RD broken? [Re: Lonkero]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Works just fine for me. Tried 4.62 and 4.63 kix32 and wkix32. On Win7 SP1.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#207166 - 2013-04-22 09:20 PM Re: RD broken? [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
just tested with 4.53

does not work with it either.
again, del removes the files in the whole tree just fine. RD does NOTHING.

I just get error 145 (The directory is not empty.)

and yes, I do have the stupid /S switch. just does not do nothing.
I'm running the script on winXP computers with a syntax like:
 Code:
rd 'c:\documents and settings\test this\desktop\' /s
@error ?
rd 'c:\documents and settings\test this\desktop' /s
@error ?


and like said, the error is 145, which SHOULD NOT HAPPEN if /s is used, unless it does not work.
_________________________
!

download KiXnet

Top
#207167 - 2013-04-22 10:17 PM Re: RD broken? [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
changed the script line to:
shell '%comspec% /c rd "c:\documents and settings\test this\desktop" /s /q'

and voila, the folder is gone. like it's supposed to be.
_________________________
!

download KiXnet

Top
#207168 - 2013-04-22 10:32 PM Re: RD broken? [Re: Lonkero]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
So the command prompt RD works, but the kix version doesn't? Interesting.
Top
#207169 - 2013-04-22 11:23 PM Re: RD broken? [Re: ShaneEP]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
I just did a simple test with a file in the directory, and it worked fine. Kix=4.62
Top
#207170 - 2013-04-22 11:34 PM Re: RD broken? [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I might check into that tomorrow.
I do run this in a startup script and I am messing with a folder with spaces...

anyways, for the time being, cmd.exe inbuilt version works fine and I get the stuff done.
_________________________
!

download KiXnet

Top
#207183 - 2013-04-24 07:59 AM Re: RD broken? [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
 Originally Posted By: Lonkero
just tested with 4.52

Almost certainly has to be something else going on there Lonk. I know that Ruud specifically fixed this in 4.52 as I was one of the ones that complained it wasn't working right in prior versions.



 Quote:
Release notes for KiXtart 2010 (version 4.52)


New functionality/enhancements:

1) CompareFileTimes has been enhanced so it can operate on open files.

2) RD can now delete an entire directory tree (including any files) using
the new "/s" parameter.

Examples:
RD "c:\somedirectory" ; deletes "somedirectory" unless it contains
; files or subdirectories

RD "c:\somedirectory" /S ; deletes "somedirectory" including any files
; and subdirectories it may contain

NOTE: Just as its commandline counterpart, KiXtart's "RD /s" command
deletes ALL files, including hidden, system and read-only files.
Use this command with great care!

Top
#207197 - 2013-04-25 02:06 AM Re: RD broken? [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well... like I said, I can only witness what I am seeing.
there is no more debugging left to do. kixtart complaints about not empty with /s switch.
I resorted to comspec counterpart and it works perfectly.
_________________________
!

download KiXnet

Top
#207647 - 2013-08-27 08:26 PM Re: RD broken? [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
coming back to it.
it still does not work.

now I am doing a manual RD on a single folder on a server and kixtart RD gives me error 5.
_________________________
!

download KiXnet

Top
#207662 - 2013-08-30 07:53 PM Re: RD broken? [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
not just RD. even move does not work right. moving a full directory will just error out.
moving files inside it with recurse will cause application error.
with 4.63
_________________________
!

download KiXnet

Top
#207663 - 2013-08-30 07:55 PM Re: RD broken? [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and 4.53 works awesome with move.
_________________________
!

download KiXnet

Top
#207664 - 2013-08-30 08:14 PM Re: RD broken? [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
umm, wow .. glad I don't need to remove anything currently.

What systems do you have except XP to behave like that (I got some XPs left to test on) plus some W2k3 and W2K8 R2 Servers as well.

And... Did you lonkenize your systems? \o/
_________________________



Top
#207665 - 2013-08-31 03:25 PM Re: RD broken? [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
systems are barely lonkenized. 64bit win7 or 32bit xp. these latest issues I have had have been with moving folder structures within fileshares on win2k8. all my scripts have shell line in place of kixtart rd lines but this latest bog with the move forced me to downgrade. I need to do a checksum on the exe because move has worked somewhat before (not correctly, hence needing the RD as well) but not anymore. makes me suspicious that it got corrupt.
_________________________
!

download KiXnet

Top
#207666 - 2013-09-01 03:53 AM Re: RD broken? [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Well on Windows 7 Robocopy is built-in so for me no reason not to use it. But even my XP boxes all have Robocopy installed so that I can use it if or when needed.

Its just too robust not to use for me.

Top
#207669 - 2013-09-03 10:35 AM Re: RD broken? [Re: NTDOC]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
ok, back on topic ..

tested move on Win7 x64 with a source folder with subdirs and files init..

 Code:
break on
move @scriptdir + "\MoveSource\" @scriptdir + "\MoveTarget\" 
"RC was: [" + @error + "] - " + @serror
get $


worked as expected -> [0] - the command completed successfully.
Checked FileSystem and found "MoveSource" with its complete content below "MoveTarget\"

Anything I miss here?!

RD results in a moment..
_________________________



Top
#207670 - 2013-09-03 10:43 AM Re: RD broken? [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
AhA!

following was done with the resulting directory:

 Code:
break on

RD @scriptdir + "\MoveTarget\" /s
"RC was: [" + @error + "] - " + @serror

get $


resulted in:
 Quote:

RC was: [145] - Das Verzeichnis ist nicht leer.


which translates to "the directory is not empty"

checking filesystem: there is now an EMPTY "MoveTarget" folder.

umm .. @kix is: 4.64

Definetly not what is stated in the documentation ..
_________________________



Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

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

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