title: how to read directory (files are n in number) in command prompt using arguments
body: <p>currently, I am using arguments while passing the filenames in the code.</p>
  <p>usage :</p>
  <pre><code>!python C:/Users/sindhus/Desktop/Fio/fio_mergefiles.py 1.log 2.log 3.log .......n output.csv 
  </code></pre>
  <p>The code I am using is as below. The &quot;readers&quot; in the below code I am using it to pass for other function.</p>
  <pre><code>debug = False
  argv = ['']+['f%02d'%n for n in range(1, n)]+[''] if debug else argv
  out  = stdout if debug else open(argv[-1], 'w')
  
  readers = [reader(open(f), n) for n, f in enumerate(argv[1:-1])]
  N = len(readers) 
  print('Interval',*('IOPS%02d'%(n+1) for n in range(N)), sep=',', file=out)
  
  # initialize for the loop
  t0 = &quot;&quot;
  
  # the loop
  for t,iops,extra1,extra2,n in merge(*readers, key=lambda x:int(x[0])):
      if t != t0:
          if t0: print(t0, *iops_l, sep=',', file=out)
          t0 = t
          iops_l = ['····' if debug else '']*N
      iops_l[n] = '%4s'%iops if debug else iops
  </code></pre>
  <p>now I am planning to keep all the input files in the folder and I want to parse only the directory name and the output_file path. I tried using path list and glob dint help much.</p>
  <p>what I want is</p>
  <pre><code>!python C:/Users/sindhus/Desktop/Fio/fio_mergefiles.py C:/Users/data/ C:/Users/output/output.csv
  </code></pre>
  <p>I have edited my code as most of them wanted what the &quot;readers&quot; parameter was returning.
  Thanks in advance.</p>