Maximo

Maximo-ICON.png

Maximo

Learn how to increase the operational efficiency of the assets you manage, and improve overall equipment effectiveness by using IoT data and AI.

Maximo-ICON.png

TRIRIGA

Reduce the operational costs of the facilities you manage, and create more engaging occupant experiences through the application of IoT data and AI.

Maximo-ICON.png

Engineering

Learn how IoT data and AI are being applied to transform the end-to-end engineering lifecycle.

Expand all | Collapse all

any automation scripts support for the file deletion from windows server

  • 1.  any automation scripts support for the file deletion from windows server

    Posted Tue August 25, 2020 09:58 AM
    Is there anyway we can delete the files from windows server using automation script in Maximo ?

    Early replies are much appreciated! :)

    ------------------------------
    Deepika B
    ------------------------------


  • 2.  RE: any automation scripts support for the file deletion from windows server

    Posted Wed August 26, 2020 12:48 AM
    Hi Deepika,

    File path should be accessible from Maximo app server host. You can either use the java or python libraries in your script to delete  a file.
    You can also look into the logic used in doclinks delete functionality. In the docklinks delete functionality, you would find the exact java libraries used by Maximo to delete attachments.
    There could be some access related hiccups which you might need to overcome.
    Try to setup sftp folder for better management of the folder access.

    Thanks,
    Biplab

    ------------------------------
    Biplab Choudhury
    Maximo Consultant
    Tata Consultancy Services
    Melbourne
    ------------------------------



  • 3.  RE: any automation scripts support for the file deletion from windows server

    Posted Thu August 27, 2020 10:33 AM
    Hi Biplab,

    Thanks for your quick response, i will check on this.

    Regards,



    ------------------------------
    Deepika B
    ------------------------------



  • 4.  RE: any automation scripts support for the file deletion from windows server

    Posted Wed August 26, 2020 03:13 PM
    here is a snippet, your action is toward the end...

    fileDirectory = File('d:\\ftp\\POERR')
    processlog.debug("******** path: " + str(fileDirectory.getPath()))
    filesList = fileDirectory.listFiles()
    processlog.debug("******* files: " + str(filesList))

    if filesList:
        for myFile in filesList:
            processlog.debug("******** is file, file name:" + str(myFile.isFile()) + ", " + myFile.getName())
            if myFile.isFile():
                fileReader = BufferedReader(FileReader(myFile))
                #processlog.debug("******** dir: " + str(dir(fileReader)))
                myLine = fileReader.readLine()
                while myLine:
                    processlog.debug("*** *** *** str: " + myLine)
                    poResubmit(myLine)
                    myLine = fileReader.readLine()
                fileReader.close()
            myFile.delete()


    ------------------------------
    keith simmons
    ------------------------------



  • 5.  RE: any automation scripts support for the file deletion from windows server

    Posted Thu August 27, 2020 10:38 AM
    Hi keith simmons,

    Thanks!
    Let me try this and come back.



    ------------------------------
    Deepika B
    ------------------------------