Throwing error with Python BackSlash -



Throwing error with Python BackSlash -

intenstion remove *.properties file, code reused other purpose also, relative path , bring together used. here unable run

destdirname ="..\\folder\\name\\present\\here\\" destbase_filename='*' filename_suffix = '.properties' destfn = os.path.join(destdirname, destbase_filename + filename_suffix) os.remove(destfn)

it throwing below error

windowserror: [error 123] filename, directory name, or volume label syntax incorrect:

please suggest

os.remove can remove 1 file @ time. need remove files individually. utilize glob.glob.

import glob files = glob.glob(destfn) file in files: os.remove(file)

python backslash

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -