#file: backuper.py
#-*- coding: utf-8 -*-
import os, sys
def main(argv=sys.argv):
with open(sys.argv[2], 'w') as fd:
for i in os.walk(argv[1]):
for file in i[2]:
fd.write(os.path.join(i[0], file)
main()
cd <path-to-script>
python backuper.py <path-to-backup-dir> <file-with-data>