Windows 10: CMD command to open random file from selected folder

Discus and support CMD command to open random file from selected folder in Windows 10 Network and Sharing to solve the problem; When I open up C:\WINDOWS\System32\cmd.exe or CMD, how do I make it open up a random file from a selected folder? I already know how to make it open up... Discussion in 'Windows 10 Network and Sharing' started by WOOFWOOF willow, Jun 7, 2021.

  1. CMD command to open random file from selected folder


    When I open up C:\WINDOWS\System32\cmd.exe or CMD, how do I make it open up a random file from a selected folder? I already know how to make it open up a file from a pathway of folders, if it helps.

    :)
     
    WOOFWOOF willow, Jun 7, 2021
    #1
  2. KTR
    ktr Win User
  3. Removing Windows.old folder

    I recently had to reinstall my OS (don't ask). Once I did there were files that I couldn't delete. Basically SecuROM files. Anyway long story short I found this workaround that I wanted to share with my fellow newbs. This will work for any file and works like a charm. Just follow the directions. *Toast :toast:
    Note: there is no space between "Administrators: (F)" I just had to but one in because it kept giving me an "unhappy face"

    When installing Windows Vista, Windows stores any existing installation of Windows on the install partition inside a hidden folder called windows.old. This folder could take up a large amount of disk space.

    Note: Please check the contents of the windows.old folder before deleting it to make sure there are no files stored there that you may wish to keep.

    Deleting the window.old folder using the disk cleanup wizard
    Click start
    Type: disk cleanup
    Press enter
    Select "Files from all users on this computer"
    Follow the rest of the instructions listed on the wizard and select the option to delete the windows.old folder
    Deleting the windows.old folder manually
    1) Open an elevated command prompt

    Click start
    Type: cmd
    right-click it under programs
    click Run As Administrator
    2) Take ownership


    Change the directory to the windows.old folder (e.g. cd c:\windows.old)
    Type: takeown /F . /A /R /D Y > NUL
    3) grant yourself permission

    Type: icacls . /grant:r Administrators: (F) /T /L /Q
    4) Delete everything

    Make sure you close any explorer or command windows that are looking at or inside the windows.old folder (except for the command window you are using). If you don't, you will receive an error while performing this step.

    Type: cd ..
    Type: rmdir /S /Q windows.old
     
    TheMailMan78, Jun 7, 2021
    #3
  4. temp02 Win User

    CMD command to open random file from selected folder

    .txt will open open in Command Prompt

    I miss the Windows XP file association manager, it allowed you to select which of the commands would be executed when you double click a file (open, print, edit, etc...), it was removed since Vista.
    Some good people created the Types application, which you can use to select the default action of the file double click, all you go to do is select the "txt" extension from the list, right mouse click, hit "Properties" and on the "Actions" tab right click "open" command and assign "Default" to it.
    Hopefully this will solve your problems, although I think your PC is probably infected with some kind of malware that will continuously change that setting back, so I also advise installing some anti-virus like MSE or NOD-32 and preform a full scan.
    Good luck.
     
    temp02, Jun 7, 2021
    #4
Thema:

CMD command to open random file from selected folder

Loading...
  1. CMD command to open random file from selected folder - Similar Threads - CMD command open

  2. How to open a file or folder exist on usb drive from powershell or cmd ?

    in Windows 10 Network and Sharing
    How to open a file or folder exist on usb drive from powershell or cmd ?: I have a USB flash memory plugged into my laptop and I want to navigate to from PowerShell . Could show me how ?!Best, https://answers.microsoft.com/en-us/windows/forum/all/how-to-open-a-file-or-folder-exist-on-usb-drive/e7df9a27-127e-4013-a5da-cc9413857c92
  3. Random cmd window opening

    in AntiVirus, Firewalls and System Security
    Random cmd window opening: About once a day, a random cmd window opens for about half a second. Then a random chrome tab opens up. The parts blurred out is my last name from my windows profile thing.I have tried the microsoft safety scanner many times and there are 0 threats....
  4. Random CMD prompt opens randomly and closes.

    in Windows 10 Gaming
    Random CMD prompt opens randomly and closes.: For the past couple of months before I installed windows 11 and was on windows 10 a cmd prompt would open, interrupt Fullscreen then close a second later. The name of the cmd prompt was a file directory to something in my AppData folder but checking for the file it doesn't...
  5. Random CMD prompt opens randomly and closes.

    in Windows 10 Software and Apps
    Random CMD prompt opens randomly and closes.: For the past couple of months before I installed windows 11 and was on windows 10 a cmd prompt would open, interrupt Fullscreen then close a second later. The name of the cmd prompt was a file directory to something in my AppData folder but checking for the file it doesn't...
  6. Open Cmd via PowerShell, command?

    in Windows 10 BSOD Crashes and Debugging
    Open Cmd via PowerShell, command?: Please i need to open cmd win + r and so i know i need to know how to open it via powershell pls (.bat and so i know it needs to be opened via powershell. Pls PowerShell command to open cmd? Cmd über PowerShell öffnen, Befehl?
  7. CMD opens randomly as I try to move files.

    in Windows 10 Ask Insider
    CMD opens randomly as I try to move files.: Is this a normal process of windows when moving files but this time is showed the application. Thank you for your help! Edit: I was moving Hearthstone to a games folder I had made. submitted by /u/AquaTCG [link] [comments]...
  8. Open folder with cmd?

    in Windows 10 Network and Sharing
    Open folder with cmd?: Hello I would like to use cmd to open a specific folder in Windows Explorer on Windows 10. Does anyone know how to do that? OOrdner mit cmd öffnen?
  9. Problem with opening selected files/programs/folders

    in Windows 10 Network and Sharing
    Problem with opening selected files/programs/folders: Heres my problem, Normally and befeore the problem starst - when I selected some files using CRTL or SHIFT button, and then double click lets say some photo, windows opens only the file i doubleclicked. Now when I select even 20 and more files and doubleclick the last...
  10. CMD Randomly opens..

    in Windows 10 Performance & Maintenance
    CMD Randomly opens..: Hey guys, So I just reformatted my PC and did a fresh install of windows 10 as my computer was running into some issues. The install went fine I reinstalled all of the computers drivers from the manufacturers website. My computer is custom built, so I had to go around to...