Dagens Spørsmål & Svar-sesjon kommer til oss med høflighet av SuperUser-en underavdeling av Stack Exchange, en fellesskapsdrevet gruppering av Q & A-nettsteder.
Spørsmålet
SuperUser leser Luu Vinh Phuc vil vite hvorfor dir *. * Viser alle filer og mapper:
When I run the dir *.* command, it produces unexpected results. Even files and folders without any dot in the name are listed. For example:
Hvorfor viser dir *. * Alle filer og mapper?
Svaret
SuperUser bidragsyter Fleet Command har svaret for oss:
The DIR command comes from a time when:
- A period (.) was not allowed as a character in file or folder names
- File and folder names were restricted to 8 characters for names and 3 characters for extensions
Therefore, by that standard, *.* meant whatever the name and whatever the extension. It did not mean a string containing a “.”, which may or may not have characters before or after the “.”.
Microsoft’s policy is preserving backward compatibility, so that interpretation of *.* is retained. But in Windows PowerShell, *.* means a string containing a “.”, which may or may not have characters before or after the “.”.
Har du noe å legge til forklaringen? Lyder av i kommentarene. Vil du lese flere svar fra andre tech-savvy Stack Exchange-brukere? Sjekk ut hele diskusjonstråden her.