Board logo

標題: 如何在c++中del c drive既file [打印本頁]

作者: veve178    時間: 2008-11-1 20:08     標題: 如何在c++中del c drive既file

如何在c++中del c drive既file
如果我咁寫
system("del c:\x.txt");
我放個programme係邊就會del果到既x.txt

[ 本帖最後由 veve178 於 2008-11-1 20:15 編輯 ]
作者: little_keung    時間: 2008-11-1 21:45

原帖由 veve178 於 2008-11-1 20:08 發表
如何在c++中del c drive既file
如果我咁寫
system("del c:\x.txt");
我放個programme係邊就會del果到既x.txt


Check the manual of your system library.
For example, unlink is the system library function for file delete in C .
作者: veve178    時間: 2008-11-2 02:36

原帖由 little_keung 於 2008-11-1 21:45 發表


Check the manual of your system library.
For example, unlink is the system library function for file delete in C .

咁點樣指定delete 係某副檔名既野?
eg:delete ?.xxx file

[ 本帖最後由 veve178 於 2008-11-2 03:02 編輯 ]
作者: Rookie_Max    時間: 2008-11-2 07:15

DOS 的話,用 del *.XXX
作者: thinkpanda    時間: 2008-11-2 11:36

原帖由 veve178 於 2008-11-2 02:36 發表

咁點樣指定delete 係某副檔名既野?
eg:delete ?.xxx file


fnmatch on Unix-like system, FindFirstFile and FindNextFile on Windows
作者: veve178    時間: 2008-11-2 15:28

原帖由 thinkpanda 於 2008-11-2 11:36 發表


fnmatch on Unix-like system, FindFirstFile and FindNextFile on Windows

thx





歡迎光臨 電腦領域 HKEPC Hardware (https://h0.hkepc.com/forum/) Powered by Discuz! 7.2