SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Writing Files to a Network Drive

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Writing Files to a Network Drive
Author Message
Duncan



Joined: 22 Jan 2004
Posts: 13

Post Writing Files to a Network Drive Reply with quote

I'm trying to write a text file to a network drive and have tried using mapped and UNC paths. The file is not being created and is generating the error:

A run-time error occurred while executing automation script: Line 17. File not found

It is filling up schedule.log with this message over and over until the service is stopped.

I have tried running it from 24x7.exe and it works fine. It is only with the service that I see this happening.

Any ideas?

Wed Jan 17, 2007 12:27 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Writing Files to a Network Drive Reply with quote

How do you write a text file? I mean, if you use a script, which method you use? Can you provide a code snippet using the actual file name and path?

: I'm trying to write a text file to a network drive and have tried using

: mapped and UNC paths. The file is not being created and is generating the

: error: A run-time error occurred while executing automation script: Line

: 17. File not found

: It is filling up schedule.log with this message over and over until the

: service is stopped.

: I have tried running it from 24x7.exe and it works fine. It is only with the

: service that I see this happening.

: Any ideas?



Wed Jan 17, 2007 2:30 pm View user's profile Send private message
Duncan



Joined: 22 Jan 2004
Posts: 13

Post Re: Writing Files to a Network Drive Reply with quote

Here is a sample of the code:

Dim f, Number

FileOpen("\\Networkpath\xxxx\xxxx\xxxx\JOB1Job337FinishedRunJob1Job347.txt", "LineMode", "Write", False, f)

FileWrite(f, "Job1Job337Finished")

FileClose(f)

Thu Jan 18, 2007 5:12 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Writing Files to a Network Drive Reply with quote

Well... I wanted to see what you have for xxxx if there are any \t or \n or \r

Anyway, to be safe the code should be changed from

\\Networkpath\xxxx\xxxx\xxxx\JOB1Job337FinishedRunJob1Job347.txt

to

\\\\Networkpath\\xxxx\\xxxx\\xxxx\\JOB1Job337FinishedRunJob1Job347.txt

For details, please read "Special ASCII Characters" topic in the on-line help.

: Here is a sample of the code: Dim f, Number

:

: FileOpen("\\Networkpath\xxxx\xxxx\xxxx\JOB1Job337FinishedRunJob1Job347.txt",

: "LineMode", "Write", False, f)

: FileWrite(f, "Job1Job337Finished")

: FileClose(f)



Thu Jan 18, 2007 9:17 am View user's profile Send private message
Duncan



Joined: 22 Jan 2004
Posts: 13

Post Re: Writing Files to a Network Drive Reply with quote

That did the trick, thanks!

: Well... I wanted to see what you have for xxxx if there are any \t or \n or

: \r

: Anyway, to be safe the code should be changed from

: \\Networkpath\xxxx\xxxx\xxxx\JOB1Job337FinishedRunJob1Job347.txt

: to

: \\\\Networkpath\\xxxx\\xxxx\\xxxx\\JOB1Job337FinishedRunJob1Job347.txt

: For details, please read "Special ASCII Characters" topic in the

: on-line help.



Thu Jan 18, 2007 10:34 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.