Windows 10: How grant folder from command prompt

Discus and support How grant folder from command prompt in AntiVirus, Firewalls and System Security to solve the problem; Hi I need to redirect Windows logs folder by mklink command but before creating a link the source folder must be deleted and when I using rmdir... Discussion in 'AntiVirus, Firewalls and System Security' started by drjackool, Jan 1, 2021.

  1. drjackool Win User

    How grant folder from command prompt


    Hi
    I need to redirect Windows logs folder by mklink command but before creating a link the source folder must be deleted and when I using rmdir command, it reports access denied. To solving this problem I have to change folders permission manually. But I need a command to change it from command prompt before calling rmdir command. I found icacls to changing folder security options but I do not know how set parameters because it is complex command.

    Please help


    Following is my batch file to redirect some Windows directories:




    @Echo OFF

    CLS



    ECHO *******************************************************************************************

    ECHO * This file applies some settings that improves the system performance *

    ECHO * and increases SSD life span *

    ECHO *******************************************************************************************

    ECHO.

    PAUSE



    ECHO {************ Creating directories redirection ************}



    :: Set redirection path to this variable

    SET REDIR_PATH="D:\SysRedirection"



    IF EXIST "%REDIR_PATH%" RMDIR /S /Q "%REDIR_PATH%"



    :: Logs

    SC stop "EventLog"

    CALL :Redirect "C:\Windows\Logs", "%REDIR_PATH%\WinLogs"

    CALL :Redirect "C:\Windows\System32\LogFiles", "%REDIR_PATH%\Sys32Logs"

    CALL :Redirect "C:\Windows\System32\winevt\Logs", "%REDIR_PATH%\EventLogs"

    SC start "EventLog"



    ECHO {************************** Done **************************}

    PAUSE



    EXIT /B %ERRORLEVEL%




    :: This function deletes the source folder and creates a junction link at target


    :: Param1: Source folder, Param2: Target


    :Redirect

    ECHO ============================================================

    ECHO Redirecting %~1

    ECHO

    IF EXIST %~1

    RMDIR /S /Q %~1

    :: Check if folder exist yet, ask the user to delete it manually

    IF EXIST %~1

    ECHO.

    ECHO [!!!NOTE!!!] Please delete %~1 manually before continue.

    PAUSE





    MKDIR %~2

    MKLINK /J %~1 %~2

    ECHO.

    EXIT /B 0

    :)
     
    drjackool, Jan 1, 2021
    #1
  2. cwtech Win User

    command prompt will not open in safe mode with command prompt

    Would I just follow the same steps within safe mode after hooking up to the other system?
     
    cwtech, Jan 1, 2021
    #2
  3. Bree Win User
    Installation media boots to command prompt

    I've just booted from known working install media to see exactly what it does when booting. The sequence of events is...

    1. Windows logo on a black screen
    2. circling dots appear beneath the logo
    3. light blue 'Please wait' screen with circling dots
    4. a command prompt window (very briefly)
    5. the initial Setup page appears

    Do you see steps 1-3? If so, it appears you have stopped at step 4, suggesting that something on the disc cannot be read.

    Does the disc boot properly in another machine? If so, try cleaning the laptop's drive lens then try booting from the disc again.

    If not, make new install media with Microsoft's Media Creation Tool, either as a bootable USB, on an ISO that you can burn to another disc. At Step 8 in Option One of this tutorial you can choose between making a USB or an ISO.

    Download Windows 10 ISO File
     
    Bree, Jan 1, 2021
    #3
  4. cwtech Win User

    How grant folder from command prompt

    command prompt will not open in safe mode with command prompt

    I am repairing a laptop for a friend and I need to access windows in safe mode and the owner has forgotten the password to the main user. I tried logging on with the administrator profile in safe mode but it is not showing up so I was going to use command prompt in safe mode with command prompt but command prompt will not open when I boot that option. Does anyone have any hints for me to figure this out?
     
    cwtech, Jan 1, 2021
    #4
Thema:

How grant folder from command prompt

Loading...
  1. How grant folder from command prompt - Similar Threads - grant folder command

  2. how to remove viruses from the command prompt?

    in Windows 10 Software and Apps
    how to remove viruses from the command prompt?: How to remove viruses from the command prompt? https://answers.microsoft.com/en-us/windows/forum/all/how-to-remove-viruses-from-the-command-prompt/a818112d-646a-4aa4-8875-682a319f8be6
  3. how to remove viruses from the command prompt?

    in Windows 10 Gaming
    how to remove viruses from the command prompt?: How to remove viruses from the command prompt? https://answers.microsoft.com/en-us/windows/forum/all/how-to-remove-viruses-from-the-command-prompt/a818112d-646a-4aa4-8875-682a319f8be6
  4. how to remove viruses from the command prompt?

    in AntiVirus, Firewalls and System Security
    how to remove viruses from the command prompt?: How to remove viruses from the command prompt? https://answers.microsoft.com/en-us/windows/forum/all/how-to-remove-viruses-from-the-command-prompt/a818112d-646a-4aa4-8875-682a319f8be6
  5. How to undo a Command in the Command Prompt?

    in Windows 10 Gaming
    How to undo a Command in the Command Prompt?: Hello Microsoft community,I have a big problem in my Windows 10 Pro, I wrote something wrong in the Command Prompt idk How to write in english and when I try tô do any actions that restart the notebook or turn It of, the spinning thing doesnt appear and It never...
  6. How to undo a Command in the Command Prompt?

    in Windows 10 Software and Apps
    How to undo a Command in the Command Prompt?: Hello Microsoft community,I have a big problem in my Windows 10 Pro, I wrote something wrong in the Command Prompt idk How to write in english and when I try tô do any actions that restart the notebook or turn It of, the spinning thing doesnt appear and It never...
  7. Desktop folder missing in Command Prompt

    in Microsoft Office and 365
    Desktop folder missing in Command Prompt: Hello Gurus Version 2004 (OS Build 19041.1110) I have just reinstalled Win 10 because I couldn't find the Desktop folder when using the Command Prompt, and its still missing. Has anybody any ideas how to fix this problem ? 183207
  8. How to create hard links to folders in Command Prompt?

    in Windows 10 Network and Sharing
    How to create hard links to folders in Command Prompt?: Hi, I'm trying to create hard links to folders in Command Prompt, just like junction /j but instead of creating a shorcut, I want to create an actual copy of the folder - hard link make the 'minecraftWorlds' appears like a regular folder. [ATTACH] I used this to create a...
  9. Deleted folder from command prompt

    in Windows 10 Ask Insider
    Deleted folder from command prompt: I was deleting some useless folders with command prompt, and I tried to delete a folder called "." or ".." Then desktop's icons deleted, and application bar's icons too. Chrome also formatted, Office logged out, and some other programs also did. Then I rebooted and now...
  10. Command Prompt not opening. Clicking on Command Prompt opens the default folder location in...

    in Windows 10 BSOD Crashes and Debugging
    Command Prompt not opening. Clicking on Command Prompt opens the default folder location in...: Hi, I'm using windows 10. I have no idea why my command prompt is not launching properly and is instead opening up the default folder in File Explorer i.e. File Explorer is opening up in the command prompt default start up folder. Please help. FYI. I recently downloaded...