Access denied

Discussion in 'Software' started by bigbazza, Oct 19, 2010.

Thread Status:
Not open for further replies.
  1. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Hi, For ages I have been using a simple batch file to backup recent downloads from my C:\Downloads Folder to my T:\Downloads external 10 meg pocket hard drive. I have not changed the batch file lately. The batch file is virtually to synchronise 2 Folders on different drives.

    I am using Windows 7 Ultimate 32 bit OS.
    The batch file has been working on W7, until about a week ago. :cry
    Batch file is:

    1.72 gigs free on my T: drive. I am only copying files up to 20 megs, or so, so space is not a problem (from MG downloads usually).

    I can open the T: drive OK. I can Copy and paste downloads from C:|downloads to T:\Downloads manually. I can read T: drive OK.

    I use an almost identical batch file to copy new documents created, from my C:\...\Documents to F:\documents and Settings and that works OK.
    Only the source Folder and Destination Folder are different. ;)
    This batch file is:

    The batch file is based on an MG members' reply to an old thread.
    I cannot remember the thread number, unfortunately. :-o

    I have used the same batch files on XP Pro SP3 and Windows 7 Ultimate 32 bit, with great success, until now.

    Can anyone point me in the right direction to fix this problem.
    I really would appreciate a solution.

    I have googled various "solutions" but could not get them to work. :(

    Bazza
     
  2. tgell

    tgell Major Geek Extraordinaire

    A file could be set to read-only. If that is the case, you need a /r switch in your xcopy. If xcopy tries to overwrite a file set to read-only, it will give an "access denied message". You could also highlight all the files in T:\Downloads\ and right click to see if there is a read only file shown. Then uncheck the read only box and hit apply. Good Luck.

    I believe the old thread you referenced is here
    http://74.86.201.210/showthread.php?p=1162937
     
  3. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    tgell, a huge thank you to finding that old thread. I will include the old reference in my tips database. :cool :major

    As for the files being already set to "read only", I don't believe this is the case. All I do is download a file from www.majorgeeks.com ( the ones that appeal to me, on a daily basis ) and then at the end of a daily Net session, I run the batch file to synchro the 2 Folders. I've just now checked my C:\Downloads Folder and none of the recent ones are "read only".

    I am not clear about your suggestion of checking my T:\Downloads Folder for "read only" attributes. I have manually set some T: downloads to "R" but that is well after the original download and is only to make sure I do not accidently delete them.

    The "R" does not relate to my recently downloaded (and transferred) Files.

    Do you mean that I cannot have any file in T:\Downloads set to "R" as it will/does upset future downloads? I assume I am reading your comment the wrong way as I don't think this has upset my Batch file in the past.

    Thanks again for your suggestions, but I am leaning towards something being wrong with my "T" drive and a backup and re-format maybe the solution.

    Bazza

    PS: I just found another reference http://forums.majorgeeks.com/showthread.php?t=173052 #8, but your link is the original one.

    Baz

    ===

     
    Last edited: Oct 19, 2010
  4. tgell

    tgell Major Geek Extraordinaire

    Hello,
    xcopy will only have an access denied if you try to overwrite an existing file with the same name with read only attributes. There should not be a problem if you are writing new files to T:\Downloads. The only other thing I can think of is to look at permissions on T: and see if you have full control.

    You are not over a network but maybe these links can help.

    http://forums.techguy.org/networking/756558-solved-xcopy-gives-access-denied.html

    http://computerhelpforum.org/forum/guides/f70/taking_ownership_of_a_drive_in_xp/t14534.html (It should be the same in Windows 7.)
     
  5. Earthling

    Earthling Interplanetary Geek

    Haven't used batch files for a few years but, as they are DOS based, might there be a file size problem here?
     
  6. Earthling

    Earthling Interplanetary Geek

    Also, there are some very capable and free sync programs available. I use one to automatically repeat my twice-daily backups to a network drive. I use SyncBack, but MS SyncToy is also very capable.
     
  7. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Thanks Earthling for your reply. :)
    I have used this batch file for downloads up to +300 megs so I don't think that is the problem.

    Bazza

    ====


     
  8. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    I guess I might have to try another program :( but I'd really like to know the answer to my batch file problem.

    Bazza

    ====

     
  9. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Thanks again, tgell. :cool
    This could be my problem. I will investigate further.

    Bazza

    ===

     
  10. plastidust

    plastidust Command Sergeant Major

    Try opening a "Command" window and then executing your xcopy command line. Need to know what is being denied access to. Is it the batch file, the xcopy command or is xcopy being denied access to something? Executing the xcopy command line in a "Command" window may give a clue.
     
  11. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Thanks guys, for your ideas and suggestions.:major

    I just had the bright idea of using the same identical Batch file but altering the target drive from T:\Downloads to my other external hard drive (F:\Downloads).

    I edited the Batch file, saved it as another name, and created the Folder F:\Downloads and ran the "new" batch file.

    The result:
    245 files copied from C:\downloads to E:\Downloads using the batch file. :-D
    A couple were "Access denied" but they had the "R" attribute set.;)

    It more or less confirms that the trouble is with my "T" drive itself. :cry

    Bazza
     

    Attached Files:

    Last edited: Oct 20, 2010
  12. tgell

    tgell Major Geek Extraordinaire

  13. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    I haven't tried that, as yet, as it used to work perfectly in non-Administrator mode. But will do. :confused :(

    Thanks for the link. It really goes against the grain, to HAVE to run programs as an Administrator.

    Bazza

    ===

     
    Last edited: Oct 21, 2010
  14. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Latest symptom/problem occurs when I try to
    "Save as" zulupad--22102010--0717hrs.zulu onto my T: drive.

    Error pops up as an Invalid file name, yet I can Copy and paste from my C: Documents Folder to my T:/ root directory without a problem.

    It has worked perfectly with that same File name format until now, using different dates and times. Obviously the File name IS valid as I can "Copy and Paste".

    I'm getting more and more confused. :cry

    Bazza

    BTW, tgell. The !@#$% batch file works perfectly when run as Administrator. :cool :cry

    Baz
     

    Attached Files:

    Last edited: Oct 21, 2010
  15. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Another question.
    Sorry, too late for previous post.
    I just missed the 10 minute MG deadline. :-o

    Batch file works perfectly when using it copy C:\Downloads to my F:\Downloads (320 gig External hard drive) in Non-Admin mode, but WONT work when run as C:\Downloads to T:\Downloads (10 gig pocket hard drive--- not USB memory stick) unless in Administrator mode.
    Can someone answer that?

    Bazza
     
  16. tgell

    tgell Major Geek Extraordinaire

    Hello,
    When you right click on the F: drive and select properties, click the security tab and look at the user names. Then click on the advance button and click on the owner tab. See who the current owner is. Now do that to the T: drive and see if there are any differences. Do this in the user account you usually log on to.
     
  17. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Thanks, tgell. I will. :cool

    Bazza

    ===

     
Thread Status:
Not open for further replies.

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds