LonkeroAdministrator
(KiX Master Guru)
2013-04-22 08:45 PM
RD broken?

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


Mart
(KiX Supporter)
2013-04-22 09:05 PM
Re: RD broken?

Works just fine for me. Tried 4.62 and 4.63 kix32 and wkix32. On Win7 SP1.

LonkeroAdministrator
(KiX Master Guru)
2013-04-22 09:20 PM
Re: RD broken?

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.


LonkeroAdministrator
(KiX Master Guru)
2013-04-22 10:17 PM
Re: RD broken?

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.


ShaneEP
(MM club member)
2013-04-22 10:32 PM
Re: RD broken?

So the command prompt RD works, but the kix version doesn't? Interesting.

AllenAdministrator
(KiX Supporter)
2013-04-22 11:23 PM
Re: RD broken?

I just did a simple test with a file in the directory, and it worked fine. Kix=4.62

LonkeroAdministrator
(KiX Master Guru)
2013-04-22 11:34 PM
Re: RD broken?

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.


NTDOCAdministrator
(KiX Master)
2013-04-24 07:59 AM
Re: RD broken?

 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!


LonkeroAdministrator
(KiX Master Guru)
2013-04-25 02:06 AM
Re: RD broken?

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.


LonkeroAdministrator
(KiX Master Guru)
2013-08-27 08:26 PM
Re: RD broken?

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.


LonkeroAdministrator
(KiX Master Guru)
2013-08-30 07:53 PM
Re: RD broken?

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


LonkeroAdministrator
(KiX Master Guru)
2013-08-30 07:55 PM
Re: RD broken?

and 4.53 works awesome with move.

JochenAdministrator
(KiX Supporter)
2013-08-30 08:14 PM
Re: RD broken?

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/


LonkeroAdministrator
(KiX Master Guru)
2013-08-31 03:25 PM
Re: RD broken?

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.

NTDOCAdministrator
(KiX Master)
2013-09-01 03:53 AM
Re: RD broken?

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.


JochenAdministrator
(KiX Supporter)
2013-09-03 10:35 AM
Re: RD broken?

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..


JochenAdministrator
(KiX Supporter)
2013-09-03 10:43 AM
Re: RD broken?

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 ..