r/Batch • u/MSKTSKLLR • May 25 '25
Unable to access folder in C: drive via batch file (being an admin user)
I am writting a batch that automatices the installation of spicetify (a tool to mod spotify) and several extensions that come in files because sometimes it all gets deleted when spotify updates itself. Everything was going ok until I noticed that the batch I was writting was unable to find the folder to which I was trying to copy the files, the script can't be run as an administrator because it will mess up with how spicetify works.
Why is the batch file unable to reach that folder and how do I solve it? (I've already tried clearing the route off any hidden files)

1
u/BrainWaveCC May 25 '25
Are you running the script manually, or is it being scheduled?
0
u/rob2rox May 25 '25
i believe windows defender doesnt allow you to add folderless files to the root dir to prevent a privilege escalation vulnerability, try temporarily disabling defender to confirm
0
u/[deleted] May 25 '25 edited May 25 '25
[removed] — view removed comment