Thank for your quick response. Now i get this error message:
–
AkendoJan 23 '12 at 15:46

@Akendo The error message you get is correct; the file does not exist in the local directory. Updated the answer with a solution that uses os.path.join.
–
phihagJan 23 '12 at 16:17

I did both, also i change into the folder. No use! All failed so far.
–
AkendoJan 23 '12 at 16:41

If you change into the folder, you'd have to call os.listdir('.') instead. Can you post the updated code? I overlooked that the error comes from Python - that means your code probably doesn't match the one in this answer. I'm assuming it looks something like: envoy.run(['rm -v', filepath]), which is wrong, since in the list notation, elements aren't split before given to execve.
–
phihagJan 23 '12 at 16:50

For some reason there's a bug with envoy. The workaround is to pass a list within a list, like this: envoy.run([['rm', '-v', '--', filepath]])
–
FlimmNov 4 '12 at 22:27