Hello experts. I have been running the following script which a fellow experts created for me here some time ago. The script works perfectly except it is taking hours to run due to the number of folders that need to be checked and created. I am wondering if there is a more efficient way to check for the existence of folders and creates folders that are missing (powershell possibly). I have reduced the number of folders in the script to keep my post concise but they are significantly more folders checked & created. The script is saved and run as a .cmd
cd /d D:\Data\
for /f "tokens=* delims=" %%A in ('dir D:\Data\*.* /b /ad') do call :makedirs "%%A"