Windows中不能用con等作为文件名

今天用R输出文件时,包括一个叫con.csv的文件,一直报错:cannot open the connection。查了一下才发现Windows下有些名字是系统专用的。比如

Name Function


CON Keyboard and display
PRN System list device, usually a parallel port
AUX Auxiliary device, usually a serial port
CLOCK$ System real-time clock
NUL Bit-bucket device
A:-Z: Drive letters
COM1 First serial communications port
LPT1 First parallel printer port
LPT2 Second parallel printer port
LPT3 Third parallel printer port
COM2 Second serial communications port
COM3 Third serial communications port
COM4 Fourth serial communications port

from https://superuser.com/questions/688145/cannot-create-con-csv-or-prn-csv-in-win7

你可能感兴趣的:(Windows中不能用con等作为文件名)