Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Retrieve modification date of a file

Hi,

 

I'm trying to retrieve modification date of a file inside an archived file.

So first I put a tFileUnarchive component

Then I've tried to get the using native variable but I' ve not found the correct variable name :

 

((String)globalMap.get("tFileUnarchive_1_CURRENT_FILEDATE"))

((String)globalMap.get("tFileUnarchive_1_CURRENT_FILETIME"))

 

Both don't work.

 

I've also tried a tFileProperties component to retrieve the mtime column (and also the mtime_string column)

But I dont' know how to put these values in a tMap component in order to write it in tFileOutputDelimited component (the goal is to create a csv file in output with the inside archive file modification time in it)

 

Any idea ?

 

Thx

Labels (3)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Just connect the tFileProperties component to the tMap then map the fields you want to the output and finally, connect the tMap to the tFileOutputDelimited

View solution in original post

10 Replies
TRF
Champion II
Champion II

Look at tFileProperties component for that

Anonymous
Not applicable
Author

"I've also tried a tFileProperties component to retrieve the mtime column (and also the mtime_string column)

But I dont' know how to put these values in a tMap component in order to write it in tFileOutputDelimited component (the goal is to create a csv file in output with the inside archive file modification time in it)"
TRF
Champion II
Champion II

Just connect the tFileProperties component to the tMap then map the fields you want to the output and finally, connect the tMap to the tFileOutputDelimited

TRF
Champion II
Champion II

Did this help?

If so, thank's to mark this case as solved (Kudos also accepted).

Anonymous
Not applicable
Author

Hi,

 

Unfortunately it does not work

 

So here is my job :

- tFileProperties component with provided working input filepath

- tMap component with links between input columns (abs_path, dirname, basename, mode_string, size, mtime and mtime_string) and output columns (same names)

- tFileOutputDelimited component with provided working output filepath (all other properties are set with default values)

 

When I run the job, and output file is generated but it only contains semicolons (0683p000009MA9p.png

Anonymous
Not applicable
Author

Ok it was a bug. I close the job. Then I add a tLogRow to see values and then relink with tFileOutputDelimited and now it works !

Thx !

TRF
Champion II
Champion II

Great!

Thank's to mark your case as solved (as it is now).

TRF
Champion II
Champion II

@nhalicka, not very fairplay to accept your solution when it has been given by someone else!!!

@nhalicka thank's for the change 0683p000009MA9p.png

Anonymous
Not applicable
Author

Sorry, I thought I had selected your solution.

Is it ok now ?