@echo off set "folderPath=\\SMB\depts\Users\%username%" set "folderPathprivate=\\SMB\depts\Users\%username%\Private" if not exist "%folderPath%" ( md "%folderPath%" md "%folderPathprivate%" rem echo Folder created successfully! ) else ( echo Folder already exists! ) exit