Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
copy testfile.txt \\\\IP_ADDR\\FOLDER
在命令行中工作,但:
os.system("copy testfile.txt \\\\IP_ADDR\\FOLDER")
不知何故不起作用。有任何想法吗?
有一个替代品,os.system但为什么这不起作用?
os.system
我认为您要么需要将反斜杠加倍,要么将 'r' 放在字符串前面:
os.system("copy testfile.txt \\\\\\\\IP_ADDR\\\\FOLDER") os.system(r"copy testfile.txt \\\\IP_ADDR\\FOLDER")