Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine whether a file already exists in the folder

Status
Not open for further replies.

sxjain3

IS-IT--Management
Oct 1, 2004
8
US
Hi,

I am trying to find whether a file with the same name exists in the folder or not, before I try and add the file to the Livelink server. How can I accomplish this?

I have the file name and the nodeid of the folder I am try to add the file into. What function can I use to pass in the File name and nodeid of the folder to get the object associated with the file and see if the object is valid. If not the file doesnt exists else it does. If it does then I can retrive the nodeid of the file and then delete it. Is it possible to do it? How ?

If I decide not to delete the file then if I had to add anther version over it, how would I do that?

I am using VB as the development tool.

Thanks in Advance.

SJ
 
You probably have to write one or if you are doing it in oscript there are methods inside that.I don't think this is exposed to lapi.But you can write a simple wrapper something like
Code:
   If Container = folder
      Then  list Objects
        Iterate List Objects
        If Name not exist
            Add Document
        Else
             Add Version if needed

         End If

Endif

Always acknowledge a fault. This will throw those in authority off their guard and give you an opportunity to commit more.
Mark Twain

appnair

 
One more thing there are two high level LAPI packages in java available in OT knowledge base called
and
.They actually encapsulate a lot of LLvalue calls using more high level stuff.I have a feeling that what you are looking for may alraedy have been provided

Always acknowledge a fault. This will throw those in authority off their guard and give you an opportunity to commit more.
Mark Twain

appnair

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top