LOG file opened and not declared in script

To the Ipswitch web site

Ipswitch Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



LOG file opened and not declared in scriptExpand / Collapse
Author
Message
Posted 4/17/2008 6:28:22 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 4/17/2008 6:48:51 PM
Posts: 2, Visits: 10
Here's my script. I'm attempting to have an unsuccessful run logged to an error log and ok run logged to a .log file.

LOG \\load-06\e$\al\02400\load_dirs\AUL_PUSH.LOG

CONNECT "SHARED SITES!MHR!MHR_AUL"
ONERROR GoTO ERROR_CONNECT

PUT \\LOAD-06\E$\AL\02400\Upload\AUL\Prep\testfile.txt
DIR
GOTO ENDIT

LABEL ERROR_CONNECT
LOG
\\load-06\e$\al\02400\load_dirs\AUL_PUSH.LOG.ERROR
LABEL ENDIT

It had created the LOG.ERROR at one time. However, it is running ok now and the log is still going to the LOG.ERROR file. Here's what's in the log. Notice that there is no mention of even executing the line that opens the .LOG.ERROR file. Hmmmmm. No ideas at this point. Matt.

Processing Line 2 [LOG AUL_PUSH.LOG]

Processing Line 4 [CONNECT "SHARED SITES!MHR!MHR_AUL"]

Connecting to 00.00.00.000:21

Connected to 00.00.00.000:21 in 0.187566 seconds, Waiting for Server Response

Initializing SSL Session ...

220-FTP Server

220-Anyone experiencing problems should contact the IT department at 000-000-0000 ext. 458.

220-

220-They can also be reached via email at xxxxxxx@xxxxxx.com

220-

220 Thank you.

AUTH TLS

234 AUTH command OK. Initializing SSL connection.

SSL session NOT set for reuse

SSL Session Started.

Host type (1): Automatic Detect

USER UdaMan

331 User name okay, need password.

PASS (hidden)

230 User logged in, proceed.

SYST

215 UNIX Type: L8

Host type (2): Unix (Standard)

PBSZ 0

200 PBSZ command OK. Protection buffer size set to 0.

PROT P

200 PROT command OK. Using private data connection.

Sending "FEAT" command to determine what features this server supports.

FEAT

211-Extension supported

 AUTH TLS

 SSCN

 PBSZ

 PROT

 CCC

 CLNT

 MDTM

 MDTM YYYYMMDDHHMMSS[+-TZ];filename

 SIZE

 SITE PSWD;EXEC;SET;INDEX;ZONE;CHMOD;MSG

 REST STREAM

 XCRC filename;start;end

 MODE Z

 MLST Type*;Size*;Create;Modify*;Win32.ea*;

211 End

Finished interpreting "FEAT" response.

Sending the FEAT command is optional.  You can disable it in the site options of the profile.

PWD

257 "/" is current directory.

Processing Line 5 [ONERROR GoTO ERROR_CONNECT]

Set [ONERROR] action to [GoTO ERROR_CONNECT]

Processing Line 9 [PUT testfile.txt]

No destination folder. The current directoy '/' is used.

TYPE A

200 Type set to A.

PASV

227 Entering Passive Mode (00,00,00,000,000,0)

connecting data channel to 00.00.00.000:000,0(32000)

data channel connected to 00.00.00.000:000,0(32000)

LIST

150 Opening ASCII mode data connection for /xxx/xx.

# transferred 852 bytes in < 0.001 seconds, 6656.250 Kbps ( 832.031 Kbps), transfer succeeded.

226 Transfer complete.

Starting request
Transfer request completed with status: Finished


Processing Line 10 [DIR]

TYPE A

200 Type set to A.

PASV

227 Entering Passive Mode (00,00,00,000,000,2)

connecting data channel to 00.00.00.000:000,2(32002)

data channel connected to 00.00.00.000:000,2(32002)

LIST

150 Opening ASCII mode data connection for /bin/ls.

# transferred 852 bytes in 0.016 seconds, 425.850 Kbps ( 53.231 Kbps), transfer succeeded.

226 Transfer complete.

  Directory of /

10/25/2007           9:37:00 AM           <DIR>               0 2007-09       

10/25/2007           9:31:00 AM           <DIR>               0 2007-10       

12/11/2007           4:54:00 PM           <DIR>               0 2007-11       

4/2/2008             11:28:00 AM          <DIR>               0 2007-12       

4/2/2008             11:28:00 AM          <DIR>               0 2007-12 audit 

4/2/2008             11:28:00 AM          <DIR>               0 2008-01       

4/9/2008             9:43:00 AM           <DIR>               0 2008-02       

4/16/2008            7:10:00 AM           <DIR>               0 2008-03       

4/9/2008             8:02:00 AM           <DIR>               0 2008-04       

4/15/2008            1:19:00 PM                          13,682 xxxxxxxxxx.csv

4/17/2008            6:12:00 PM                               0 testfile.txt  

  9 Dirs  2 Files  13,682 Bytes

Processing Line 13 [GOTO ENDIT]

Jump to command [LABEL ENDIT] at line 19

Processing Line 19 [LABEL ENDIT]

QUIT

221-Anyone experiencing problems should contact the IT department at 000-000-0000 ext. .

221-

221-They can also be reached via email at xxxxxxx@xxxxxx.com

221-

221 Thank you.

Connection closed.  Ready for next connection.

Thanks,

Matt.

Post #42946
Posted 4/24/2008 2:07:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 4/28/2008 12:05:07 PM
Posts: 2, Visits: 9
I think our 2 problems are related (I posted mine earlier today) - I have some old scripts originally programmed to run under version 8.0 that do exactly what you are trying to do, but after upgrading to version 2007 I found that no matter what line you put the "Log filename.txt" command it starts the log from the beginning AND if you declare 2 separate log files the script creates both files but only uses the second name - so your issue is that version 2007 can only have 1 log command in the script.

Since all you are trying to do is have an easy way of seeing if there was an error you might be able to use a shell command to rename the log file to the required name:

Try changing your second log command to:

LABEL ERROR_CONNECT

SHELL copy \\load-06\e$\AL\02400\load_dirs\aul_push.log \\load-06\e$\al\02400\load_dirs\aul_push.log.error

Post #43164
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Dave, Mark Singh, kevin r gillis, Jason Benton, Brandon Felger, Ben Henderson, Tripp Allen, Will Sansbury, Hush, FTPplanet.com, Hugh Garber, WUP-PM, mmulryan@ipswitch.com, mswimm

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 5:33pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 8 queries. Compression Enabled.