#!/usr/bin/python #-*-conding:utf-8-*- #获取目录下文件的绝对路径 import os def getabsroute(path): listdir = os.listdir(path) filepath = os.getcwd() allfile = [] for file in listdir: allfile.append(filepath + '\' + file) print(allfile) getabsroute('E:\java')