get only file names from CMD 1

get only file names from CMD

dir /W

Here is what the above code is Doing:
1. We’re creating a variable called “path” and setting it equal to the path of the current working directory.
2. We’re creating a variable called “files” and setting it equal to a list of all the files in the current working directory.
3. We’re creating a variable called “file_count” and setting it equal to the length of the list of files in the current working directory.
4. We’re printing the number of files in the current working directory.
5. We’re printing the names of all the files in the current working directory.

Similar Posts