pcd2txt
"""
Created on Tue Oct 29 22:43:59 2019
@author: sgl
"""
import os
from os import listdir, path
path_str = '/media/david/pcd' # your directory path
txts = [f for f in listdir(path_str)
if f.endswith('.pcd') and path.isfile(path.join(path_str, f))]
for txt in txts:
with open(os.path.join(path_str, txt), 'r') as f:
lines = f.readlines()
with open(os.path.join(path_str,os.path.splitext(txt)[0]+".txt"), 'w') as f:
f.write(''.join(lines[11:]))