2022年12月13日 星期二

OSError: [Errno 22] Invalid argument:

1Error message :


File "tarfile.py", line 2155, in makefile with bltn_open(targetpath, "wb") as target:

 OSError: [Errno 22] Invalid argument:


 This looks like a windows problem as colons in filenames are reserved characters in Windows. We don't like the idea of renaming the actual file for the sake of supporting in Windows. We will look into alternatives and track this as an enhancement separately. 

2. Edit tarfile.py :


 You should add a line in 2155 

# targetpath_s = targetpath.replace(':','-')



Automatically classify folders by file name (windows Bash)

  REM List file names, sorted by file name--------- dir /b /on > list.txt REM Find JPG files findstr ".JPG" list.txt > targe...