Page 1 of 1 1
Topic Options
#79653 - 2003-04-15 08:44 AM COPY/MOVE/DEL issues fixed in RC2?
Ruud van Velsen Offline
Developer
*****

Registered: 1999-05-06
Posts: 359
Loc: Amsterdam, The Netherlands
The title pretty much says it all: if you have reported a COPY/MOVE/DEL issue with RC1, please let me know if the issue has been resolved with RC2.

Kind regards,

Ruud

Top
#79654 - 2003-04-15 11:58 AM Re: COPY/MOVE/DEL issues fixed in RC2?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11548
Loc: CA
The following code is now correctly handled with KiXtart v4.21-RC2

Reported here as well.
http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=3;t=000391;p=2



Break On
$myfile='C:\TEMP\TEST.TXT'
DEL $myfile
'File deletion returned error is: '+@ERROR+'  '+@SERROR



File deletion returned error is: 2 The system cannot find the file specified.

Will test other operations later today and report back on them.

[ 15. April 2003, 11:59: Message edited by: NTDOC ]

Top
#79655 - 2003-04-21 08:45 AM Re: COPY/MOVE/DEL issues fixed in RC2?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11548
Loc: CA
My testing of KiXtart v4.21-RC2 seems to work as expected with the COPY/MOVE/DEL functions.

The only thing I found maybe odd was that having code to COPY C:\TEST1\ C:\NEWTEST\

Depending on how you expect things to happen. In DOS saying to copy C:\TEST1\ C:\NEWTEST\ would attempt to copy all the files in C:\TEST1\ to C:\NEWTEST\ but since the folder does not exist, would do nothing. KiXtart doesn't copy the files either, BUT it DOES create the folder C:\NEWTEST\ which I would not expect.

Other then that, all other situations of COPY/MOVE/DEL worked as I would expect.

Top
#79656 - 2003-04-21 06:59 PM Re: COPY/MOVE/DEL issues fixed in RC2?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11548
Loc: CA
Has anyone else done any testing and can confirm or deny issues with this?

Please test and post your findings.

Top
#79657 - 2003-04-22 02:54 AM Re: COPY/MOVE/DEL issues fixed in RC2?
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We have verified with following script the COPY/DEL/MOVE commands.
The results aren't like we expected
code:
?
? @kix
?
COPY "t:\kix1" "t:\kix2a" /h ? "wait @error (@serror)"
get $
COPY "t:\kix1" "t:\kix2b" /h /s ? "wait @error (@serror)"
get $
COPY "t:\kix1" "t:\kix3" /h /s ? "wait @error (@serror)"
get $

MOVE "t:\kix1" "t:\kix4" /s ? "wait @error (@serror)"
get $

DEL "t:\kix3" ? "wait @error (@serror)"
get $
DEL "t:\kix4" /s ? "wait @error (@serror)"
get $
?
? "completed @kix"

For Kixtart 4.21 rc 1
code:
4.21 Release Candidate 1

wait 0 (The operation completed successfully.)
wait 0 (The operation completed successfully.)
wait 0 (The operation completed successfully.)
wait 0 (The operation completed successfully.)
wait 0 (The operation completed successfully.)
wait 0 (The operation completed successfully.)

completed 4.21 Release Candidate 1

shows no warnings, but both DEL commands doesn't have any impact. The other
commands work fine.

For Kixtart 4.21 rc 2
code:
4.21 Release Candidate 2

wait 87 (The parameter is incorrect.)
wait 87 (The parameter is incorrect.)
wait 87 (The parameter is incorrect.)
wait 87 (The parameter is incorrect.)
wait 2 (The system cannot find the file specified.)
wait 2 (The system cannot find the file specified.)

completed 4.21 Release Candidate 2

nothing happens at all.

The structure of the "t:\kix1" is:
code:
(d)     t:\kix1
(f) collect_info.kix
(f) collect_info.txt
(d) t:\kix1\sources
(f) collect_info.kix

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#79658 - 2003-04-22 06:22 AM Re: COPY/MOVE/DEL issues fixed in RC2?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11548
Loc: CA
MCA,

The t:\kix1 should be t:\kix1\ with a trailing slash.

t:\kix1 without slash assumes it is a file and may attempt to copy it as a file.

Try with and without \ also with and without extension or file names.

Top
#79659 - 2003-04-22 02:41 PM Re: COPY/MOVE/DEL issues fixed in RC2?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Here are the test results. I ran several versions of this using a trailing backslash and such.. The successful results are below.

FINDINGS:
(1)KiX 4.20 did not create the folders, but rather created files.
(2)NTDOC was correct, you do need to include trailing backslashes at various points of the script.
(3)KiXtart 4.21 - RC2 Documentation needs to be updated with this information especially the MOVE command.

Here is MCA's modified code with results included in.
code:
CLS
BREAK ON
?
? @kix
?
COPY "c:\kix1" "c:\kix2a\" /h ? "wait @error (@serror)"
;Creates a file with 4.20
;ADD A TRAILING BACKSLASH, GET A WAIT 3, PATH NOT SPECIFIED
;if c:\kix1 does not exist, no error reported under 4.20
;Creates a FOLDER with 4.21 RC-2 and no sub-folders
get $
COPY "c:\kix1" "c:\kix2b\" /h /s ? "wait @error (@serror)"
;creates a file with 4.20
;ADD A TRAILING BACKSLASH, GET A WAIT 3, PATH NOT SPECIFIED
;if c:\kix1 does not exist, no error reported under 4.20
;Creates a FOLDER with 4.21 RC-2 with sub-folders
get $
COPY "c:\kix1" "c:\kix3\" /s ? "wait @error (@serror)"
;creates a file with 4.20
;if c:\kix1 does not exist, no error reported under 4.20
;4.21 Results:
;(1)COPY "c:\kix1" "c:\kix3" /h /s ? "wait @error (@serror)"
;(1)parameter is incorrect error 87
;(2) COPY "c:\kix1" "c:\kix3\" /s ? "wait @error (@serror)"
;Operation completed successfully
get $
;Original command MOVE "c:\kix1" "c:\kix4" ? "wait @error (@serror)"
MOVE "C:\Kix1\" "C:\kix4\" ? "wait @error (@serror)"
;renames or moves kix1 to kix4 with 4.20 all files are intact
;if c:\kix1 does not exist, no error reported under 4.20
;4.21 results
;(1)MOVE "c:\kix1" "c:\kix4" /s ? "wait @error (@serror)"
;(1)parameter is incorrect error 87
;(2)MOVE "c:\kix1" "c:\kix4\" /s ? "wait @error (@serror)"
;(2)parameter is incorrect error 87
;(3)Documentation suggests
;(3)MOVE "C:Kix1" C:"kix4" ? "wait @error (@serror)"
;(3)kix4
;(3)wait 2 (The system cannot find the file specified.)

GET $
DEL "c:\kix3\" ? "wait @error (@serror)"
;Does not remove file or folder under 4.20
;4.21 results
;(1)path not specified
;(2)DELETES ALL FILES FROM C:\KIX3 and not the sub-folder
get $
DEL "c:\kix4\" /s ? "wait @error (@serror)"
;Removes files from C:\kix4 and not the subdirectory under 4.20
;4.21 results
;(1)path not specified
;(2) cannot find folder
get $
?
? "completed @kix"

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#79660 - 2003-04-24 02:15 AM Re: COPY/MOVE/DEL issues fixed in RC2?
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We have reinvest the problem again. Thanks NTDOC.

We make a distinction between operations with "\" as specification.
Also we take a look at DOS commands for COPY, DEL, MOVE and XCOPY.

btw: the manual doesn't specify the requirement of "\" at the end. A "\" specification
makes it clear, that is handling directory names. Without it can be a directory, but also
a file.
of course the specification of "\" makes the type of disk-entry (has we to deal with a file
or directory) more clear.

So we create a new structure
code:
x:\dir1
file1
file2
dir11
file1
file2
x:\file1

DOS command COPY:

- COPY x:\dir1 x:\file1
system ask for overwrite. "file1" is a combination of "x:\dir1\file1" & "x:\dir1\file2"
- COPY x:\dir1\ x:\file1\
returns "invalid directory"
- MKDIR x:\dir3
COPY x:\dir1\ x:\dir3\
the "x:\dir3" will contain a copy of "x:\dir1\file1" & "x:\dir1\file2" as separate files.

DOS command XCOPY:

- XCOPY x:\dir1 x:\dir3
as user
Does x:\dir3 specify a file name or directory name on the target
(F = file, D = directory)?D
file1
file2
2 File(s) copied
- XCOPY x:\dir1\ x:\dir4\
the directory "x:\dir4" will be created automatically.
the "x:\dir4" will contain a copy of "x:\dir1\file1" & "x:\dir1\file2" as separate files.

When we are running following script
code:
; copy "source"  "destination"  /H /S
; del "x:\file" "name" /H /S
; move "source" "destination" /H /S
?
? @kix
?
? "-copy-"
?
COPY "x:\dir1" "x:\dir3a" /h /s ? ".1.. @error (@serror)"
COPY "x:\dir1\" "x:\dir3b\" /h /s ? ".2.. @error (@serror)"
COPY "x:\dir1" "x:\dir3c\" /h /s ? ".3.. @error (@serror)"
?
COPY "x:\dir1" "x:\file1a" ? ".4.. @error (@serror)"
COPY "x:\dir1" "x:\file1b" /h /s ? ".5.. @error (@serror)"
COPY "x:\dir1" "x:\file1c\" /h /s ? ".6.. @error (@serror)"
?
? "-move-"
?
COPY "x:\dir1" "x:\dir6a\" /h /s MOVE "x:\dir6a" "x:\dir7a" /h /s ? ".1.. @error (@serror)"
COPY "x:\dir1" "x:\dir6b\" /h /s MOVE "x:\dir6b\" "x:\dir7b\" /h /s ? ".2.. @error (@serror)"
COPY "x:\dir1" "x:\dir6c\" /h /s MOVE "x:\dir6c" "x:\dir7c\" /h /s ? ".3.. @error (@serror)"
COPY "x:\dir1" "x:\dir6d\" /h /s MOVE "x:\dir6d\" "x:\dir7d" /h /s ? ".4.. @error (@serror)"
? ;-
COPY "x:\dir1" "x:\dir6a\" /h /s MOVE "x:\dir6a" "x:\dir8a" /h ? ".5.. @error (@serror)"
COPY "x:\dir1" "x:\dir6b\" /h /s MOVE "x:\dir6b\" "x:\dir8b\" /h ? ".6.. @error (@serror)"
COPY "x:\dir1" "x:\dir6c\" /h /s MOVE "x:\dir6c" "x:\dir8c\" /h ? ".7.. @error (@serror)"
COPY "x:\dir1" "x:\dir6d\" /h /s MOVE "x:\dir6d\" "x:\dir8d" /h ? ".8.. @error (@serror)"
? ;-
COPY "x:\dir1" "x:\dir6a\" /h /s MOVE "x:\dir6a" "x:\dir9a" ? ".9.. @error (@serror)"
COPY "x:\dir1" "x:\dir6b\" /h /s MOVE "x:\dir6b\" "x:\dir9b\" ? ".10. @error (@serror)"
COPY "x:\dir1" "x:\dir6c\" /h /s MOVE "x:\dir6c" "x:\dir9c\" ? ".11. @error (@serror)"
COPY "x:\dir1" "x:\dir6d\" /h /s MOVE "x:\dir6d\" "x:\dir9d" ? ".12. @error (@serror)"
? ;-
COPY "x:\file1" "x:\file9a" MOVE "x:\file9a" "x:\file7a" ? ".13. @error (@serror)"
COPY "x:\file1" "x:\file9b" MOVE "x:\file9b\" "x:\file7b\" ? ".14. @error (@serror)"
COPY "x:\file1" "x:\file9c" MOVE "x:\file9c" "x:\file7c\" ? ".15. @error (@serror)"
COPY "x:\file1" "x:\file9d" MOVE "x:\file9d\" "x:\file7d" ? ".16. @error (@serror)"
?
? "-del-"
?
DEL "x:\dir8a\" /h /s ? ".1.. @error (@serror)"
DEL "x:\dir8b\" /h ? ".2.. @error (@serror)"
DEL "x:\dir8c" /h /s ? ".3.. @error (@serror)"
DEL "x:\dir8d" /h ? ".4.. @error (@serror)"

will return following screen output
code:
4.21 Release Candidate 2

-copy-

.1.. 87 (The parameter is incorrect.)
.2.. 3 (The system cannot find the path specified.)
.3.. 0 (The operation completed successfully.)

.4.. 87 (The parameter is incorrect.)
.5.. 87 (The parameter is incorrect.)
.6.. 0 (The operation completed successfully.)

-move-

.1.. 87 (The parameter is incorrect.)
.2.. 87 (The parameter is incorrect.)
.3.. 87 (The parameter is incorrect.)
.4.. 87 (The parameter is incorrect.)

.5.. 0 (The operation completed successfully.)
.6.. 0 (The operation completed successfully.)
.7.. 0 (The operation completed successfully.)
.8.. 0 (The operation completed successfully.)

.9.. 0 (The operation completed successfully.)
.10. 0 (The operation completed successfully.)
.11. 0 (The operation completed successfully.)
.12. 0 (The operation completed successfully.)

.13. 0 (The operation completed successfully.)
.14. 123 (The filename, directory name, or volume label syntax is incorrect.)
.15. 0 (The operation completed successfully.)
.16. 123 (The filename, directory name, or volume label syntax is incorrect.)

-del-

.1.. 0 (The operation completed successfully.)
.2.. 0 (The operation completed successfully.)
.3.. 2 (The system cannot find the file specified.)
.4.. 2 (The system cannot find the file specified.)

Implementation of above output learn us
- using end-symbol "\" in your directory/file name isn't always clear.
sometimes we must specify it in the source-name. in other situations it is
required in the destination-name.
- way COPY is working isn't similar with COPY dos command.
- kixtart command MOVE doesn't recognize "/S" parameter. in our opinion it can't
be a parameter at all in an MOVE operation.
- DEL command doesn't delete empty subdirectories when "/s" parameter is specified.
currently it deletes only existing files in subdirectories and subdirectories.

Our suggestions are
  • using end-symbol "\" in your directory\file name specification will be
    interpretated as directory name
  • using NO end-symbol "\" in your directory\file name specification means
    kixtart will check what kind of type entry is it. A directory or a file.
    f.e.
    - COPY "old_entry" "new_entry"
    means that file "old_entry" will copied to file "new_entry". it works like DOS command COPY.
    means that directory "old_entry" will create the directory "new_entry" before copying entries
    to the directory "new_entry". it works like DOS command XCOPY.
    - COPY "old_entry" "new_entry\"
    means that "old_entry" will copied to directory "new_entry\", when it exist.
    kixtart will return an error, when the directory "new_entry\" doesn't exist.
    - MOVE "old_entry" "new_entry"
    means the same as a RENAME of file- or directory name. the "/h" parameters can
    handle also HIDDEN files or directories.
    .
    Of course it can be interesting, that users should specified end-symbol "\" for
    specifying a directory entry. Useful because the COPY, MOVE and DEL can have an
    enormous impact when they are specifying the "/s" parameter too. An user doesn't
    get warnings, but they only see the results.
  • remove "/S" parameter in kixtart MOVE command. it has no meaning by a
    move operation.
    currently it returns an error message.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#79661 - 2003-04-24 02:50 AM Re: COPY/MOVE/DEL issues fixed in RC2?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11548
Loc: CA
Thanks MCA,

In general aside from a couple minor items you mention, I think it is working very close to expected behavior. To DEL /S should only be deleting files. RD would be for removing the folder(s). If DEL is removing the folder, then that would an unexpected behavior.

One of the big problems was either no error code or the wrong error code. The error code returned now appears to be correct.

The reason I say I think it is working in General is that the KiX commmands can do a mix of things that either DOS alone or Explorer alone can't do. i.e. you can't copy/move a file and rename it at the same time with Explorer.

Top
#79662 - 2003-04-25 01:33 AM Re: COPY/MOVE/DEL issues fixed in RC2?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
MCA,

I don't think this is correct..

quote:

using end-symbol "\" in your directory\file name specification will be
interpretated as directory name
using NO end-symbol "\" in your directory\file name specification means
kixtart will check what kind of type entry is it. A directory or a file.

It is OK that we have to use the trailing slash - '\' to do this.. However, the system should be 'smart' enough to know the attributes of file versus folder.

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#79663 - 2003-04-25 02:48 AM Re: COPY/MOVE/DEL issues fixed in RC2?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11548
Loc: CA
Kent,

Try that in DOS and see what you get. You will get all the files in that folder copied INTO a single file of the same name as your destination.

If you don't tell DOS it is a folder it will assume it is a file.

Top
#79664 - 2003-04-25 03:21 AM Re: COPY/MOVE/DEL issues fixed in RC2?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Ok..

I can agree.. I was just thinking that the system could be 'smart', where it would perform a test like that of GETFILEATTR.

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#79665 - 2003-04-25 05:13 PM Re: COPY/MOVE/DEL issues fixed in RC2?
Ruud van Velsen Offline
Developer
*****

Registered: 1999-05-06
Posts: 359
Loc: Amsterdam, The Netherlands
Actually, KiX tries to be smart, and does use the file attributes of the source and the target. However, things get complicated when the target does not yet exist. In this situation, KiXtart fails the COPY/MOVE if the source is a directory or wildcard spec (because it does not know what you want to happen), unless the target ends with a backslash (in which case KiX assumes you intend the target to be a directory).

If this sounds complicated, then that is because it actually is [Smile]

Ruud

Top
#79666 - 2003-04-25 07:08 PM Re: COPY/MOVE/DEL issues fixed in RC2?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
The Docs need to be updated, however..

quote:

Documentation suggests
MOVE "C:Kix1" C:"kix4" ? "wait @error (@serror)"

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#79667 - 2003-04-26 01:39 AM Re: COPY/MOVE/DEL issues fixed in RC2?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22298
Loc: OK
actually, to be a smartie...

if the source is directory or not does not matter...
if the source has wildcards, does not matter.

each and every filesystem object from source to target...
I can't see any hardness in that.
no place for quessing...
or, what am I missing?
_________________________
!

download KiXnet

Top
#79668 - 2003-04-26 02:03 AM Re: COPY/MOVE/DEL issues fixed in RC2?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22298
Loc: OK
k, re-read ruuds post.

so moving say c:\mydata to c:\mydata2 where mydata2 does not exist, should everyone understand it to basically rename the root dir.

copy can't be that harder as if the source is dir, so is target.

if using wildcars, every matching source will have it's own matching target, ofcourse.
by the name and object-type.
_________________________
!

download KiXnet

Top
#79669 - 2003-04-26 08:45 AM Re: COPY/MOVE/DEL issues fixed in RC2?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Lonk,

You will hear no arguments here.

The 4.21 Docs state with the Move (page 40)..

MOVE "C:Kix1" C:"kix4"

Really, it should be..

MOVE "C:\Kix1\" "C:\kix4\"

I agree that the directory should have a trailing slash to discern between a file and a directory.

Playing a bit at the CMD prompt, we see:

C:\>move kix1 kix4

Does the rename of the folder..

code:
C:\>move c:\kix1\ c:\kix4\
The system cannot find the file specified.

And..
code:
C:\>move c:\kix1 c:\kix4
1 file(s) moved.

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#79670 - 2003-05-03 03:33 PM Re: COPY/MOVE/DEL issues fixed in RC2?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
So..

Where does this sit at this point?

What issues are still outstanding with 4.21?

Are we "good to go?"

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#79671 - 2003-05-05 12:17 AM Re: COPY/MOVE/DEL issues fixed in RC2?
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Of course kixtart should be smart enough about "what to do with and without
the end-symbol '\'".
Possible
  • The description in the manual should be very clear, what the result will be.
    Currently the position of that end-symbol isn't always clear and doesn't return
    always the expected result.
    It should be very clear, because those kixtart commands work without direct feedback
    to the user. User doesn't see any progress during f.e. COPY operation and he doesn't
    get always a clear error status.
  • Ruud doesn't copy the bad things of DOS command equivalent. Copy all the files in
    a specific folder INTO a single file of the same name as your destination is a good
    result. Specially when the user doesn't check for "does the destination already exist
    and is it a file or directory" and when he forgets to create the wanted directory.
  • Possible that Ruud can introduce also the RENAME command, which is an already
    an existing DOS command. It has the same effects as a MOVE, but handles on the
    same drive.
    The MOVE kixtart command can move one file or directory to another drive with another name
    specified and it will work like the rename command when the operation takes place
    on the same drive.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


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

Who's Online
2 registered (Allen, ShaneEP) and 158 anonymous users online.
Newest Members
Sjaak, Biybucket, Markus1961, Ian231, kixnewbie12
17480 Registered Users

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