我想使用命令 pdftotext 将我的所有 .pdf 文件从特定目录转换为 .txt 格式...但我想使用 python 脚本来执行此操作...我的脚本包含:
import glob
import os
fullPath = os.path.abspath("/home/eth1/Downloads")
for fileName in glob.glob(os.path.join(fullPath,'*.pdf')):
fullFileName = os.path.join(fullPath, fileName)
os.popen('pdftotext fullFileName')
但我收到以下错误:
Error: Couldn't open file 'fullFileName': No such file or directory.