On 2017-01-12 18:32, Peter Otten wrote:
> Why did you add an explicit isdir() check? My understanding is that
> the names in dirs are known to be directories.
Ah, right. The code I had laying around that did something similar
but processes both the dirs and the files, so when the OP asked for
jus
Tim Chase wrote:
> def dir_iter(root):
> for fullpath in (
> os.path.join(path, dir_)
> for path, dirs, files in os.walk(root)
> for dir_ in dirs
> ):
> if os.path.isdir(fullpath):
> yield fullpath
Why did you add an explicit
On 2017-01-12 19:28, Iranna Mathapati wrote:
> Example:
> CLI Input: /root/user/branches/xyz
>
> find latest file and append to CLI path:
> "/root/user/branches/xyz/Apple"
I've used something like the below to find the most recent file in a
directory tree (it also works for pulling other attribu
On 12/01/17 13:58, Iranna Mathapati wrote:
Hi Team,
How to append file path and find the latest folder according to the latest
date:
CLI input :"/root/user/branches/xyz"
i want to find latest file within CLI input path and append to given CLI
path
Example:
CLI Input: /root/user/branches/xyz
Hi Team,
How to append file path and find the latest folder according to the latest
date:
CLI input :"/root/user/branches/xyz"
i want to find latest file within CLI input path and append to given CLI
path
Example:
CLI Input: /root/user/branches/xyz
find latest file and append to CLI path:
"/ro