/List-Main-Directory-File-Names

This is a simple script that creates a list of names for the files/folder within the same directory and outputs it to a text file. The name of the output text file is needed as a parameter. Created and Tested on Windows OS.

Primary LanguagePython

List-Directory-File-NamesV1 (Completed/Working)

This is a simple script that creates a list of names for the files/folder within the same directory and outputs it to a text file. The name of the output text file is needed as a parameter. Created and Tested on Windows OS.
Note(s):
-The python script name itself is excluded.

-Possible improvement is to have the script run a recursive function to search through the folders within the main directory and return sub file/folder names. (See https://github.com/homerflander/List-Directory-File-NamesV2)

-Created and Tested on Windows OS.

--------------------Demonstration--------------------
Command Prompt, Looking at the Test Folder Main Directory:
cdmfolder


File Explorer, Looking at the Test Folder Main Directory:
explorerfolder


Incorrect Parameters Attempts, Error Message Given:
1."python ListDirFileNames.py" lacks the name of the output text file.
2."python ListDirFileNames.py output1.txt output2.txt" has one too many output text file paramters.
wrong


Correct Parameters Attempt, Script Ran and Successful:
correct


File Explorer/Command Prompt, Check that Output Text File is Created:
check1


Command Prompt/Text File, Check that the Output Text File is Correct:
check2