i am trying to copy a file from a local drive to a Network storage. The file is a TXT file with 6380 lines. Opening the Target file, the copy of the file is not complete, it stops at line 6285 in the middle of the line. The File Itself is a G-Code with 103 kb.
Source File Line 6285: "Z17.168 Y7.393" and the file continues...
Target File Line 6285: "Z17.168 Y7.3" after this its the end of the file.
I tired several differnt copy operations:
from shutil import copyfile
copyfile(WorkDir + FileName, CNCDir + FileName)
or
os.system("copy "+WorkDir + FileName +" " + CNCDir + FileName)
or also the DOS XCOPY command. The weird thing is, that if i perform the copy command in a separate dos window with the same syntax it works perfect, just by executing it from the PYTHON script, it does not copy the complete file.
Any ideas?