Message234025
source_path = Path('../data')
destination_path = Path('//file_server/work/whatever')
for file_name in source_path.glob('xyz-*'):
shutil.copyfile(source_path / file_name, destination_path / file_name)
leads to:
Traceback (most recent call last):
File "copy_shares_2_work.py", line 9, in <module>
shutil.copyfile(source_path / file_name, destination_path / file_name)
File "C:\Python34\lib\shutil.py", line 90, in copyfile
if _samefile(src, dst):
File "C:\Python34\lib\shutil.py", line 75, in _samefile
return os.path.samefile(src, dst)
File "C:\Python34\lib\genericpath.py", line 90, in samefile
s1 = os.stat(f1)
TypeError: argument should be string, bytes or integer, not WindowsPath
Converting to str() works but is unexpected. |
|
Date |
User |
Action |
Args |
2015-01-14 13:02:56 | mkesper | set | recipients:
+ mkesper |
2015-01-14 13:02:56 | mkesper | set | messageid: <1421240576.75.0.719151648499.issue23241@psf.upfronthosting.co.za> |
2015-01-14 13:02:56 | mkesper | link | issue23241 messages |
2015-01-14 13:02:56 | mkesper | create | |
|