title: how can i get the path plus the name of the first file in a folder and so on in python
body: <p>I got this code and i need to take the first path of a file and the files name an have put it as a string</p>
  <pre><code>from pathlib import Path
  from os import walk
  import os
  from posixpath import dirname
  f = []
  jhon = r'C:\Users\ioshu\Desktop\you'
  for (dirpath, dirnames, filenames) in walk(jhon):
      f.extend(filenames)
      f.extend(dirnames)
      break
  Ben1= filenames[:1]
  Ben2= dirpath[:2]
  
  dataFolder = Path(r'C:\Users\ioshu\Desktop\you')
  
  print(Ben1 , dataFolder)
  print(dataFolder)
  </code></pre>
  <p>The <code>print (ben1, dataFolder)</code>
  the output&quot; of that file is
  <code>C:\Users\ioshu\Desktop\you ['07a5iya4vfm91-DASH_720.mp4']</code>
  The problem is that i need the out put to be like this <code>C:\Users\ioshu\Desktop\you\0q74nqluycm91-DASH_720</code></p>