r/Batch•
yuixiuy

Access denied

Question (Unsolved)

Hey everyone I have been using this script for a while now to move files into seperate folders and also name the folder with the file name.

@ echo off

for %%i in (*) do (

if not "%%~ni" == "organize" (

md "%%~ni" && move "%%~i" "%%~ni"

)

)

It has worked in the past but now getting access denied on a new computer. I editing these files on a nas.

Thankyou

Posted Jun 3, 2025, 3:58 AM UTC

28
Loading comments…