Solved

Read the name of the latest file from the location

  • 2 October 2023
  • 1 reply
  • 29 views

Userlevel 3
Badge

I have a file placed in a location. I am trying to read the name of the latest uploaded file/latest modified file on that location. How can this be done?

 

I tried using Tbox Start program --> Powershell function. Here buffer contains the location where the file is stored. 

image

Once the  location is steered to get the name of the latest file, I am using clipboard to save the name of the file

image

 

Issues:

1. Name of the latest file is not copied. Either it is the random file from the location or none at all (last copied data - pasted on the clip board)

2. What is the correct way to clear the clipboard. I used the function with empty value but doesn't work

 

Thanks in advance.

[Originally asked and solved on Support Hub]

icon

Best answer by Community Administrator 2 October 2023, 14:43

View original

1 reply

Userlevel 4
Badge +2

Try this!

Syntax: "(Get-ChildItem | Sort-Object CreationTime -Descending | Select-Object -First 1).Name | Clip"

ba6f488097b0bd50ae61758fe153afbf.iix

Reply