New
#1
Powershell command file to automatically list file/folder names
I used "dir /b > file.txt" in a shift+right-click command prompt window to get the result I needed. Now, shift+right-click only shows the option for Powershell. I don't necessarily want to edit the registry to change that so I'm trying to adapt. In Powershell, using the command "ls | % Name file.txt" does the trick but there's two things I want to be able to do...
1) Double-click a single command file to run the script and automatically generate the text file I need
2) Have the script ignore the "file.txt" and the command file itself (because it adds "file.txt" to the list, which I don't need)
I have tried making a .ps1 file but my knowledge is very limited on using Powershell and I can't get it work exactly how I need. I don't need anything from the list other than the file/folder name itself (no properties such as size, type, etc.) Any help would be appreciated.
Thanks!