Solved

Access a flat file on UNIX

Posted on 2001-06-05
9
580 Views
Last Modified: 2013-12-18
We have installed the Notes Server on a UNIX machine.

I want to kill a file from my Agent periodically, but he can't find the path of the file?

CODE LotusScript :

Const path$ = "/lotus/notesr4/data1/sapfile.csv"
     
If Dir$( path$ ,0 ) = "" Then
   Msgbox( "No file on : '" + path$ + "'" )
Else
   Kill path$
End If


Thank you for the help.
ToniA
0
Comment
Question by:ToniA
9 Comments
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 100 total points
Comment Utility
Your current path should be "/lotus/notesr4/data1" and you are using a relative path convention and specifying whole path.

use path$ = "sapfile.csv" this will find the file

if you are not sure what your default data dir is use curdir function to check

~Hemanth
0
 
LVL 13

Expert Comment

by:CRAK
Comment Utility
Another thing to remember: Unix has case-sensitive filenames!
0
 
LVL 4

Expert Comment

by:stamp
Comment Utility
Hello ToniA,

runnig your code on my Unix mashine worked, after solwing directory and file access bit problems ;-)
Before solwing this probles this messages appeared:
05.06.2001 17:05:51   Addin: Agent 'killIt' error message: Path not found
05.06.2001 17:07:42   Addin: Agent 'killIt' error message: Path/file access error  

Do you get something simmelar?

Regards,
stamp
0
 
LVL 5

Expert Comment

by:snocross
Comment Utility
Listening...
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Expert Comment

by:tgebruik
Comment Utility
Maybe this little code sniffet helps???

direc = session.GetEnvironmentString( "Directory" , True) ' get the Notes Data Directory from notes.ini    
     fileName$ = "sapfile.csv"     ' this will be the file system name for the file
     fullpath$ = direc + "\" + fileName$
        Kill fullpath$

I use this on my Linux Server and it works like a charm...    
0
 

Author Comment

by:ToniA
Comment Utility
Stamp:

The message that I get is : "Path not found"
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
ToniA, Did you try my solution ???

checked curdir ???

if so then this quetion doesn't need this much of long wait .
0
 

Author Comment

by:ToniA
Comment Utility
HemanthaKumar :

Hello...Keep it easy. You'll get the points.
Some people maybe has other things to do in sametime!;-\

Thank you for your help
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
I am trying to Keep It Simple.

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now