Page 1 of 1 1
Topic Options
#46613 - 2003-10-13 05:17 PM Error Log
Quest Offline
Fresh Scripter

Registered: 2002-06-14
Posts: 11
I know this is a dumb question but where is the error log created when you add the @error or @serror. I dont get any errors from the login screen when my script runs but it isn't copying the file it is suposed to. Sorry the new guy
Top
#46614 - 2003-10-13 05:23 PM Re: Error Log
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Please post your code that does the copy.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#46615 - 2003-10-13 05:30 PM Re: Error Log
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
@error and @serror does not go to a log unless you specifically code to send it there. I would have to assume you don't code to a log, or you would not be asking. [Roll Eyes]

@error and @serror sends the text to the KiX console.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#46616 - 2003-10-13 06:39 PM Re: Error Log
Quest Offline
Fresh Scripter

Registered: 2002-06-14
Posts: 11
if exist (C:\MEI_INV)=1
%comspec% Copy "R:\network_update\mei_inv\Invoicing.hlp" "C:\MEI_INV" /c echo"
endif

Top
#46617 - 2003-10-13 06:42 PM Re: Error Log
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Try something like:
code:
break ON
if exist ("C:\MEI_INV")
Copy "R:\network_update\mei_inv\Invoicing.hlp" "C:\MEI_INV"
? "@error @serror"
endif

[edit]
[Embarrassed] fixed quotes from hurried copy/paste
[/edit]

[ 13. October 2003, 19:51: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#46618 - 2003-10-13 06:49 PM Re: Error Log
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Missing quotes... tsk,tsk
if exist (C:\MEI_INV)=1
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#46619 - 2003-10-13 07:50 PM Re: Error Log
Quest Offline
Fresh Scripter

Registered: 2002-06-14
Posts: 11
I added the "" and now i get an error
3 system CANNOT FIND THE PATH SPECIFIED.

This is an upgrade to a program all I need the script to do is find the folder on the workstations and if it exists copy the files.

I know simple but I'm not much of a programer this was just the easiest was to map network drives and add shortcuts to desktops.

Top
#46620 - 2003-10-13 07:52 PM Re: Error Log
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Did you use my example to you posted above? If so, then check to make sure that the paths you specified exist.

[ 13. October 2003, 19:54: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#46621 - 2003-10-13 08:27 PM Re: Error Log
Quest Offline
Fresh Scripter

Registered: 2002-06-14
Posts: 11
Yes I used your text. Do I need to Change Dir before kix will look at the workstations local dir.
Top
#46622 - 2003-10-13 08:29 PM Re: Error Log
Quest Offline
Fresh Scripter

Registered: 2002-06-14
Posts: 11
Sorry the path does exist. In case it makes a difference I am testing on a w2k workstation.
Top
#46623 - 2003-10-13 08:46 PM Re: Error Log
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Try
code:
break ON
$source='R:\network_update\mei_inv\Invoicing.hlp'
$dest='C:\MEI_INV\'
select
case not exist($source)
? $source+' does not exist'
case not exist($dest)
? $dest+' does not exist'
md $dest
? ''+@ERROR+' - '+@SERROR
if not @error
? 'Created folder '+$dest
copy $source $dest
? ''+@error+' - '+@serror
else
? 'Unable to create folder '+$dest
endif
case 1
copy $source $dest
? ''+@error+' - '+@serror
endselect

_________________________
There are two types of vessels, submarines and targets.

Top
#46624 - 2003-10-13 09:43 PM Re: Error Log
Quest Offline
Fresh Scripter

Registered: 2002-06-14
Posts: 11
that worked great. now I need to make it so it only runs once and doesn't over write the files every time they log in. any suggestions. Thanks for all your help.
Top
#46625 - 2003-10-13 09:48 PM Re: Error Log
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
A) The whole thing should be an admin script and not run during the login as the task has nothing do do with regular login tasks.

B) See COMPAREFILETIMES() in the KiXtart Manual.
_________________________
There are two types of vessels, submarines and targets.

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 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.067 seconds in which 0.029 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