Page 1 of 1 1
Topic Options
#35693 - 2003-01-27 08:55 AM @error
zz_vf_zz Offline
Getting the hang of it

Registered: 2002-04-07
Posts: 53
Hi,
I'm using the following command to copy files in kix:

shell '%compsec% /e:1024 /c copy SOURCE DESTINATION'

and check @error for any errors.
The funny thing is that on win2k it works fine, and @error returns non-zero if SOURCE doesn't exist, but in win95 the value returned by @error is zero.

Any ideas?

Thank you,
V.F.

Top
#35694 - 2003-01-27 09:05 AM Re: @error
Jochen Administrator Offline
KiX Supporter
*****

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

did you try to work with the Copy command ?
Should give you more relevant error checking [Wink]
_________________________



Top
#35695 - 2003-01-27 09:27 AM Re: @error
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yeah.
more specificly, please read the manual and use kixtart's commands.
DoS is history.

code:
copy "SOURCE" "DESTINATION"

gives you just the same
_________________________
!

download KiXnet

Top
#35696 - 2003-01-27 09:46 AM Re: @error
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
thank you
_________________________



Top
#35697 - 2003-01-27 09:46 AM Re: @error
zz_vf_zz Offline
Getting the hang of it

Registered: 2002-04-07
Posts: 53
I need to know which error occured - I'd like to ignore share violation, but to treat all other errors.
Dos copy returns different values for each error (for example 11 for share violation), but kix copy returns same value for all errors.

Thank you,
V.F.

Top
#35698 - 2003-01-27 09:47 AM Re: @error
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
that is not true.
please, read the manual.
_________________________
!

download KiXnet

Top
#35699 - 2003-01-28 12:39 AM Re: @error
zz_vf_zz Offline
Getting the hang of it

Registered: 2002-04-07
Posts: 53
I get error value 2 both for sharing violation and for source file that doesn't exist.

Thank you,
V.F.

Top
#35700 - 2003-01-27 04:57 PM Re: @error
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
What do you mean with sharing violation? If the file is on a share that the user cannot exist then 'File Not Found' is the correct error code for that file.

[ 27. January 2003, 16:58: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#35701 - 2003-01-27 05:01 PM Re: @error
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
How can you attach the share so you can copy it in Win95 if the user is not authorized to use that share? Are you taking about file ownership here?
_________________________
Jack

Top
#35702 - 2003-01-28 01:47 AM Re: @error
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I know sort of thing for share violation.
when someone or some program has locked the file...

anyway, that ain't error 11 at all.
_________________________
!

download KiXnet

Top
#35703 - 2003-01-28 08:22 AM Re: @error
zz_vf_zz Offline
Getting the hang of it

Registered: 2002-04-07
Posts: 53
By saying sharing violation, I mean that the file is in use by some application (like operating system), and copy tries to overwrite it.

In dos, in such cases error number 11 is returned, but in kix error value 2 is returned.

My problem is that kix copy returns 2 for other errors as well, like when source doesn't exist.

Thank you once again for your help,
V.F.

Top
#35704 - 2003-01-28 08:38 AM Re: @error
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, I can't get that error 11.

not sure as I run w2k not dos 6.22

anyway, you can try it. remove rights to write to destination and check the error.
it will be 5.

also, what version of kix you were using?
as far as I know, versions since 2.xx return correct errors.
_________________________
!

download KiXnet

Top
#35705 - 2003-01-29 10:19 AM Re: @error
zz_vf_zz Offline
Getting the hang of it

Registered: 2002-04-07
Posts: 53
I'm using kix 3.47.
This problem occurs in win95 only (in win2k it works fine).
Error 5 is for 'access denied', while error 11 is for 'sharing violation' - when the file is in use by the OS.
There are no NTFS permissions in win95, so I can't get error 5.

Thanks,
V.F.

Top
#35706 - 2003-02-02 08:02 AM Re: @error
zz_vf_zz Offline
Getting the hang of it

Registered: 2002-04-07
Posts: 53
Any ideas?

Thank you,
V.F.

Top
#35707 - 2003-02-02 07:24 PM Re: @error
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, write protect the destination (read-only flag)
and then check.
if it still gives you 2...
_________________________
!

download KiXnet

Top
#35708 - 2003-02-04 12:27 AM Re: @error
zz_vf_zz Offline
Getting the hang of it

Registered: 2002-04-07
Posts: 53
After making the target read only, I still get error 2.

Thanks,
V.F.

Top
#35709 - 2003-02-04 05:28 AM Re: @error
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, I have a suggestion.
I have no way of testing this on win95.

so I have a request for you.
I found multiple fixes to copy after 3.47, so could try with at least 3.62 or even 4.12

not sure about others, but as the situation is now, I may not help you more.

please return did it help.
_________________________
!

download KiXnet

Top
#35710 - 2003-02-04 04:52 PM Re: @error
zz_vf_zz Offline
Getting the hang of it

Registered: 2002-04-07
Posts: 53
Hi,

I tested it in ver 4.10, and now I get error 5 for both source that doesn't exist and sharing violation.

Thanks,
V.F.

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
0 registered and 255 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.069 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