Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 609
  • Last Modified:

Access a flat file on UNIX

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
ToniA
Asked:
ToniA
1 Solution
 
HemanthaKumarCommented:
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
 
CRAKCommented:
Another thing to remember: Unix has case-sensitive filenames!
0
 
stampCommented:
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
Independent Software Vendors: 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!

 
snocrossCommented:
Listening...
0
 
tgebruikCommented:
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
 
ToniAAuthor Commented:
Stamp:

The message that I get is : "Path not found"
0
 
HemanthaKumarCommented:
ToniA, Did you try my solution ???

checked curdir ???

if so then this quetion doesn't need this much of long wait .
0
 
ToniAAuthor Commented:
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
 
HemanthaKumarCommented:
I am trying to Keep It Simple.

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now