Solved

Access a flat file on UNIX

Posted on 2001-06-05
9
589 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 100 total points
ID: 6155952
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
ID: 6155985
Another thing to remember: Unix has case-sensitive filenames!
0
 
LVL 4

Expert Comment

by:stamp
ID: 6156638
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:snocross
ID: 6156962
Listening...
0
 
LVL 1

Expert Comment

by:tgebruik
ID: 6158542
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
ID: 6158636
Stamp:

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

Expert Comment

by:HemanthaKumar
ID: 6159214
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
ID: 6160304
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
ID: 6160391
I am trying to Keep It Simple.

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DAOS - Backup / Restore 2 198
How to add a username for multiple users in Lotus 6 122
Add code to Lotus Notes view column 2 135
Code for extraction to mkdir folder 5 78
For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 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