|
|
|
|
Python 3
|
14 lines
|
10 sloc
|
0.299 kB
  1. #!/usr/bin/env python3 
  2. import subprocess 
  3.  
  4. lsOutput = subprocess.check_output(["ls", "-1"]) 
  5. lsOutputString = lsOutput.decode("utf-8").splitlines() 
  6.  
  7. zipString = ".zip" 
  8. zipsList = [] 
  9.  
  10. for filename in lsOutputString: 
  11.     if zipString in filename: 
  12.         zipsList+=filename 
  13.  
  14. print(zipsList)