我正在編寫一個程序,列出Windows上目錄中的所有文件。我簡單地使用所提供的文件管理功能,但我很好奇的結果:「」什麼是「。」和「Windows」目錄中的「..」?
Target file is *.*
The first file found is .
The next file found is ..
The next file found is file0
The next file found is file1
...
...
The next file found is fileN
所以從技術上講,這些是什麼和「..」?我記得我在cmd中使用「cd ..」來退出到上層目錄。對於「cd。」,我不知道它是什麼。
「。」代表當前目錄你在哪裏與Windows資源管理器/總指揮官或其他文件管理器,其中「..」表示命令上升1級到上層目錄,如你所說。 – psulek