Litwos Litwos - 8 months ago 40
Python Question

Get specific file with glob

I am trying to locate a specific .xml file with glob. But the path comes from an object, and it doesn't seem to work.

I followed this example: Python: How can I find all files with a particular extension?

The code is this:

import glob
ren_folder = 'D:\Sentinel\D\S2A_OPER_PRD_MSIL1C_PDMC_20160710T162701'

I get invalid syntax...

SyntaxError: invalid syntax


You are closing the flie name string prematurely, it should be: