cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Read file properties

smajumdar
2-Explorer

Read file properties

Hi,

I want to read a file from the Thingworx server which is being send from a device every 5 mins. I need to read it and display the columns in a mashup. Can anyone help me how to do this.

3 REPLIES 3

You should look at FileRepository services, this Uploaded files should reside on a FileRepository thing.

Aanjan
12-Amethyst
(To:smajumdar)

Soumya, what sort of properties are you looking for? Basic ones like name, size, type etc? Once it is on your repository, as Carles mentioned, you can use a service like 'GetFileListing' on your Repository Thing to display the file with its properties.

smajumdar
2-Explorer
(To:Aanjan)

Hi Ravi,

I want to to read the text.log which will be sent from a remote device every 5 mins. I have to parse the below 4-5 properties from the file. The structure is shown below.

04-Jul-2016 17:03:06.422 INFO [main] RESULT=        3-SFU

04-Jul-2016 17:03:06.422 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jun 9 2016 11:16:29 UTC

04-Jul-2016 17:03:06.422 INFO [main] COMPLETED=         06/22/2016 07:15PM

04-Jul-2016 17:03:06.422 INFO [main] SPControl v=               10.0.8

04-Jul-2016 17:03:06.422 INFO [main] CURRENT_LOG_CSF3=            250

04-Jul-2016 17:03:06.422 INFO [main] UPLOAD_COUNTER=          28

04-Jul-2016 17:03:06.422 INFO [main] LAST_APPLICATION_FILE=             C:\Test\test.txt

04-Jul-2016 17:03:06.422 INFO [main] LAST_UPDATE==           04-Jul-2016 17:03:06.422

among these I need to find out the values for RESULT=, COMPLETED= , SPControl v= etc

Announcements


Top Tags