Is it the shell script also be triggered via ansible? If yes then you can 
register the path and work with it later. If not then do you know roughly when 
script be triggered then can just use shell command to find the directory with 
created date.

Sent from my iPhone

> On 2 Dec 2022, at 05:57, Jason Wood <[email protected]> wrote:
> 
> After performing a shell script, a new directory is created and I need to 
> work with that directory, but I don't know the name.
> 
> How can I get the name of the most recent directory created?
> 
> The name will be formatted like 2022-12-01_1702, so the directory I need will 
> be the last if sorted alphanumerically, if that helps.
> 
> I found resources for looking at files, but not directories. If it's 
> necessary to find this directory based on the creation date of its contents, 
> there are files located at [dirname]/Databases/Filename.xxx
> 
> Thanks!
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/3b559b55-8658-4df0-b32b-a227def8ca40n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7E74CF9E-4D72-480F-805B-D1F6735E8F18%40gmail.com.

Reply via email to