On Feb 7, 3:16 pm, Peter Otten <__pete...@web.de> wrote: > smac2...@comcast.net wrote: > > xls_files = glob.glob(in_dir + "*.xls") > > Try changing that to > > pattern = os.path.join(in_dir, "*.xls") > xls_files = glob.glob(pattern) > > os.path.join() inserts a (back)slash between directory and filename if > necessary. > > > merge_xls(in_dir="C:\Documents and Settings\smacdon\Desktop\09 Aggregate > > JWS") > > If you paste the directory name literal into the interactive interpreter > you'll be surprised: > > >>> "C:\Documents and Settings\smacdon\Desktop\09 Aggregate JWS" > > 'C:\\Documents and Settings\\smacdon\\Desktop\x009 Aggregate JWS' > > "\09" is intrpreted as chr(9). Use a raw string to prevent Python from > interpreting a backslash as the start of an escape sequence > > >>> r"C:\Documents and Settings\smacdon\Desktop\09 Aggregate JWS" > > 'C:\\Documents and Settings\\smacdon\\Desktop\\09 Aggregate JWS' > > or use forward slashes as directory separators.
Disregard my last post, I was able to figure it out, I also had to cover the out_file file name into a raw string as well. Thanks again for all the help!!! -- http://mail.python.org/mailman/listinfo/python-list