Folder share permissions script

I created this script just to make my life a little bit easier.


Either run this script as administrator or create a shortcut to this script, set it to run as admin.


@echo off
color 0a
goto check_Permissions
echo Administrative permissions required. Detecting permissions…

net session >nul 2>&1
if %errorLevel% == 0 (
echo Success: Administrative permissions confirmed.
goto start
) else (
color 0c
echo Failure: Current permissions inadequate. Please run as administrator. Recommend creating shortcut and setting it to run as admin.
goto end

pause >nul

echo ===============
echo Folder Share Script
echo ===============
set /p arpath=Copy folder path into this window and press enter:
for %%A in (%arpath%) do set filename=%%~nxA
net share “%filename%”=”%arpath%” /GRANT:EVERYONE,FULL /CACHE:NONE
echo Folder shared successfully. Press any key to exit
pause > nul

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s