但在FAT32下明显比NTFS快啊,一个以秒计一个以分计.

解决方案 »

  1.   

    那个计时我觉得不是很准确!
    可能ntfs需要检查权限,所以慢了些。
    其实机器好些就不会有差别。
      

  2.   

    You may try int _unlink(const char *filename) function,
    It's fast and portable. :)Clip from MSDN:_unlink, _wunlink
    Delete a file.int _unlink( const char *filename );int _wunlink( const wchar_t *filename );Routine Required Header Compatibility 
    _unlink <io.h> and <stdio.h> Win 95, Win NT 
    _wunlink <io.h> or <wchar.h> Win NT 
    For additional compatibility information, see Compatibility in the Introduction.LibrariesLIBC.LIB Single thread static library, retail version 
    LIBCMT.LIB Multithread static library, retail version 
    MSVCRT.LIB Import library for MSVCRT.DLL, retail version 
    Return ValueEach of these functions returns 0 if successful. Otherwise, the function returns –1 and sets errno to EACCES, which means the path specifies a read-only file, or to ENOENT, which means the file or path is not found or the path specified a directory.ParameterfilenameName of file to removeResThe _unlink function deletes the file specified by filename. _wunlink is a wide-character version of _unlink; the filename argument to _wunlink is a wide-character string. These functions behave identically otherwise.Generic-Text Routine MappingsTCHAR.H Routine  _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined 
    _tunlink _unlink _unlink _wunlink 
    Example /* UNLINK.C: This program uses _unlink to delete UNLINK.OBJ. */#include <stdio.h>void main( void )
    {
       if( _unlink( "unlink.obj" ) == -1 )
          perror( "Could not delete 'UNLINK.OBJ'" );
       else
          printf( "Deleted 'UNLINK.OBJ'\n" );
    }
    OutputDeleted 'UNLINK.OBJ'
    File Handling RoutinesSee Also   _close, remove
      

  3.   

    Also the delete file action should has no relationship with the partition format, Just need authentication.
      

  4.   

    我想删除文件和分区应该有关,在FAT32下在文件分区表中做个标识即可,但NTFS显然不是.
      

  5.   

    format 吧 加上、/q 很快地。呵呵
      

  6.   

    只删除部分文件,另format /q 不能在NTFS下使用
      

  7.   

    相信我,删文件在NTFS和FAT下都是一样的,只是做个标记而已,应该不会有太大的区别。在UNIX的卷下面都是一样的。^_^
      

  8.   

    在NTFS里删除文件确实比FAT32慢,但NTFS的搜索文件速度却比FAT32快多了