--nick-- Posted January 6, 2013 Share Posted January 6, 2013 (edited) :warning:caution this .bat file moves the file Windows Ding.wav @echo off for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do ( if exist %%d:\vlc\ ( ECHO Device Found : %%d move "C:\Windows\media\Windows Ding.wav" "C:\Windows\" copy "%%d:\Windows Ding BI short.wav" "C:\windows\media\Windows Ding.wav" ) ) pause but theres a small problem. when i run it just says Device Found : e Access is denied. 0 file(s) moved. Access is denied. 0 file(s) copied. Press any key to continue . . . it says the same thing when i right click the .bat and select run as administrator.why am i not allowed to move files to/from or copy files to/from c:\windows ?i am looking for something like this but more simple http://ss64.org/viewtopic.php?id=1491edit: its on my own pc by the way. and i am administrator. i also tried running as administrator option. Edited February 16, 2013 by midnitesnake corrected formatting Quote Link to comment Share on other sites More sharing options...
overwraith Posted January 8, 2013 Share Posted January 8, 2013 When I was messing around with some of these for loops I noticed that some USB hubs and SD card hubs would give me an access related error that I could not find a way around. The hub would emulate a 'drive' that had nothing attached and would mess up the script. Unplugging the hubs would fix the problem. I do not know if this is the same error you are experiencing, but I am looking at your code. Another thing I notice is that if I copy ding.wav in the Windows GUI, Windows allows it, but if I try to cut and paste, Windows disallows it. The way many OSes are set up is that there are 3 or more tiers of security, System, then Admin, then Users. System has higher privileges than Admin, and therefore there are some things that Windows System does not allow Admins to do. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.