Advertisement
parkdream1

test.py

Jun 10th, 2014
512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. import os
  2. import sys
  3. import msvcrt
  4. from subprocess import call
  5. def get_filepaths(directory):
  6.     file_paths = []
  7.     for root, directories, files in os.walk(directory):
  8.         for filename in files:
  9.             filepath = os.path.join(root, filename)
  10.             file_paths.append(filepath)
  11.     return file_paths
  12.  
  13. full_file_paths = get_filepaths("C:\ss")
  14. i = 0
  15. while True:
  16.     char = sys.stdin.read(1)
  17.     if char == "q":
  18.         call(["cmd", "C:\listfile\adb.exe -s 127.0.0.1:5555 push C:\listfile\%s.txt /data/%s.txt"%(full_file_paths[i],full_file_paths[i])])
  19.         print full_file_paths[i]
  20.         i = i + 1
  21.         if i == len(full_file_paths):
  22.             i =0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement