我有一个扩展路径名
import { interval } from 'rxjs';
import { filter, publish } from 'rxjs/operators';
const source = interval(400);
const observable = publish()(source.pipe(
filter(x => x % 2 === 0),
));
observable.connect();
我要用来读取Excel文件的。使用
\\Africa-me.xxx.com\Africa-me\xxx\xxx\xxx\xxx\06 xxx\02 xxx, xxx and xxxx xxx\03 xxx\04 xxx\05 xx xx & xx\12 2018 xx\06 xx xxx\\
工作正常,但我想创建一个动态链接以使用不起作用的glob遍历不同的子文件夹和文件
os.path.exists(r'\\?\UNC\Africa-me.xxx.com\xxx\xxx\xxx\xxx\06 xxx\02 xxx, xxx and xxxx xxx\03 xxx\04 xxx\05 xx xx & xx\12 2018 xx\06 xx xxx\\\AAA-61\abcd (xyz-9) Interim Report 01-03-18.xlsx')
那么如何在变量中使用fpath = r'\\?\UNC\Africa-me.xxx.com\xxx\xxx\xxx\xxx\06 xxx\02 xxx, xxx and xxxx xxx\03 xxx\04 xxx\05 xx xx & xx\12 2018 xx\06 xx xxx\\'
ldir = []
ldir = next(os.walk(fpath))[1]
for i in range(0,1):
for filename in glob.glob(fpath+ldir[i]+"\\"+"*Interim*.xlsx"):
print(filename)
print(os.path.exists(filename))
来进行glob之类的操作