Windows 10: Powershell command file to automatically list file/folder names

Discus and support Powershell command file to automatically list file/folder names in Windows 10 Support to solve the problem; 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... Discussion in 'Windows 10 Support' started by ReleaseTheKrkn, Mar 6, 2021.

  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!

    :)
     
    ReleaseTheKrkn, Mar 6, 2021
    #1
  2. slozomby Win User

    Recent File List

    Remove-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
    \Applets\Paint\Recent File List" -name file1

    Remove-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
    \Applets\Paint\Recent File List" -name file2
    Remove-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
    \Applets\Paint\Recent File List" -name file3
    Remove-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
    \Applets\Paint\Recent File List" -name file4
    Remove-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
    \Applets\Paint\Recent File List" -name file5
    Remove-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
    \Applets\Paint\Recent File List" -name file6
    Remove-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
    \Applets\Paint\Recent File List" -name file7
    Remove-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
    \Applets\Paint\Recent File List" -name file8
    Remove-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
    \Applets\Paint\Recent File List" -name file9
    ...

    you get the idea. ( too lazy to put it in a for loop and test it.

    or just open regedit and remove all the fileX from that key.
     
    slozomby, Mar 6, 2021
    #2
  3. White Win User
    List file names than a folder.

    Is there a bat file to generate the list of file names that I have inside a folder?
    If possible you can help me to do it or give me suggestions. Thanks in advance.

    Please.
     
    White, Mar 6, 2021
    #3
  4. dark2099 Win User

    Powershell command file to automatically list file/folder names

    Generating a .txt based file list in Windows 7

    I want to be able to generate a .txt file that lists all the files and folders in a specific folder on my PC, but don't know the name of any programs that do that. Searched on google a bit and came up with this guide, but it's for XP and I can't seem to find some of the folder options to modify the .bat file. Any suggestions? Thanks

    http://www.theeldergeek.com/file_list_generator.htm

    EDIT: The .bat file will do what I want if it is in the folder I want to do it in, but the option I want to add is having the right click option that it shows.
     
    dark2099, Mar 6, 2021
    #4
Thema:

Powershell command file to automatically list file/folder names

Loading...
  1. Powershell command file to automatically list file/folder names - Similar Threads - Powershell command file

  2. Files and folders with $ in the name

    in Windows 10 Software and Apps
    Files and folders with $ in the name: My C: drive SSD was replaced by Dell. All of my applications and files were lost. I can reinstall all the applications, but the files I saved at S3 are funky to use. Many folders have "$" appended to the folder name. Then under the folder many files also have "$" appended to...
  3. Files and folders with $ in the name

    in Windows 10 Gaming
    Files and folders with $ in the name: My C: drive SSD was replaced by Dell. All of my applications and files were lost. I can reinstall all the applications, but the files I saved at S3 are funky to use. Many folders have "$" appended to the folder name. Then under the folder many files also have "$" appended to...
  4. Command Prompt Renaming Files with " and ' in the file name.

    in Windows 10 Network and Sharing
    Command Prompt Renaming Files with " and ' in the file name.: I have a folder with thousands of files with in it. I have been trying to run various batch commands on the files within this folder, however some of these files have " and ' within their filename. Is there some way to either eliminate the problem characters from within the...
  5. File folder name

    in Windows 10 Network and Sharing
    File folder name: When I'm trying to type a name into a new file, it will stop me after so many characters. What is going on? How do I fix this? https://answers.microsoft.com/en-us/windows/forum/all/file-folder-name/87c6a0f0-b69b-4506-ac4f-3d340bdc3f21
  6. File Listing in Folders

    in Windows 10 Network and Sharing
    File Listing in Folders: Why does Windows 10 Explorer not display ALL of the files in a designated folder? I have an App Finale Print Music 2014 that I used to create new music encryptions; then saved to a designated folder. Then I call up Win Ex that folder, but the new entry may or not appear. I...
  7. List folder files.

    in Windows 10 Software and Apps
    List folder files.: How can I fall in love with all the files in a folder starting from 1 to the number of files that the folder contains. It could be some .bat or some advice thanks 164506
  8. List file names than a folder.

    in Windows 10 Software and Apps
    List file names than a folder.: Is there a bat file to generate the list of file names that I have inside a folder? If possible you can help me to do it or give me suggestions. Thanks in advance. Please. 162655
  9. Automatic File Naming

    in Windows 10 Ask Insider
    Automatic File Naming: I have to save a lot of images from a browser daily and I usually do that by dragging the image from the browser to a folder. The image automatically gets a name that consists of random numbers and letters. Can I somehow make new files acquire a sequential name? So if I have...
  10. Changing File name with PowerShell

    in Windows 10 Network and Sharing
    Changing File name with PowerShell: Hello everyone, I am rookie in a power shell, and I will be grateful for some help. I was trying to rename the suffix of filename, but it didn't go very well. Name of my file is: "hello.txt.abcdefg" I want to rename it into "hello.txt". I already tryed something like this:...