Results 1 to 16 of 16

Thread: [RESOLVED] File copy error 75

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    292

    Resolved [RESOLVED] File copy error 75

    i am trying to create a file backup program. i am using FileCopy to do this
    VB Code:
    1. FileCopy origFile, copyfile
    when i try this i get error 75
    could this be caused by being a limited user or not. if it only runs on administrator is there a way round this problem

    Also is there a way to set a Folder box to not show hidden folders on the drive. this is because i think when i was testing this may have caused some problems.

    thanks
    'Rarely is the question asked: Is our children learning?' George Bush

    visit my website @ www.freewebs.com/vbplanet

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: File copy error 75

    If you don't have access...no.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    292

    Re: File copy error 75

    but is the error caused by being a limited user
    'Rarely is the question asked: Is our children learning?' George Bush

    visit my website @ www.freewebs.com/vbplanet

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: File copy error 75

    I have no idea on how your permissions were set up... I repeat do you have access to the files? If you don't have access to the files you cannot do anything to them.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    292

    Question Re: File copy error 75

    well i have tried the code on a admin account and it still dosent work. this is my full code
    VB Code:
    1. origPath = Dir1.Path
    2. origFile = File1.FileName
    3. copyPath = Dir2.Path
    4. Print origPath
    5. origBack = origPath + "\" + origFile
    6. FileCopy origBack, copyPath
    7. End Sub
    could this be the problem. i am not sure why permissions should be a problem because i can copy files in windows using the menus so i dont think any are protected
    'Rarely is the question asked: Is our children learning?' George Bush

    visit my website @ www.freewebs.com/vbplanet

  6. #6
    Hyperactive Member umilmi81's Avatar
    Join Date
    Sep 2005
    Location
    Sterling Heights, Mi.
    Posts
    335

    Re: File copy error 75

    Try putting a backslash (\) on the end of copyPath

    Because otherwise it tries to overwrite the directory with the file. Putting the slash tells it to put it IN the directory instead of overwriting it.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    292

    Re: File copy error 75

    thanks umilmi81. i tried it and it copied but the file never materialised. where do i add the backslash to
    VB Code:
    1. FileCopy origFile, copyfile \
    this causes errors
    or
    VB Code:
    1. copyPath = Dir2.Path +"\"
    thanks
    'Rarely is the question asked: Is our children learning?' George Bush

    visit my website @ www.freewebs.com/vbplanet

  8. #8
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: File copy error 75

    Why don't you post what the actual value of the variables in this statement are:
    VB Code:
    1. FileCopy origBack, copyPath

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    292

    Question Re: File copy error 75

    i think i have located the problem
    VB Code:
    1. copyPath = Dir2.Path + "\"
    do i need to add the original filename as well to make it copy correctly
    'Rarely is the question asked: Is our children learning?' George Bush

    visit my website @ www.freewebs.com/vbplanet

  10. #10
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: File copy error 75


  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    292

    Re: File copy error 75

    here are two images showing the values in the variables and also my code. it still doesnt work. i have had zip them to upload them
    Attached Files Attached Files
    'Rarely is the question asked: Is our children learning?' George Bush

    visit my website @ www.freewebs.com/vbplanet

  12. #12
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: File copy error 75

    Does the destination folder exist? What is the error? On the FileCopy line?

  13. #13
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: File copy error 75

    So why use images, just do a Debug.Print of the variables and post the text.

  14. #14
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: File copy error 75

    BTW: You are copying the file to itself... I would think that this should generate an error...

  15. #15

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    292

    Re: File copy error 75

    dont know what i changed but now it works fine. thanks guys for all your guidance and help for anyone who has the same problem here is my copying code
    VB Code:
    1. Private Sub Command4_Click()
    2. Drive1.Enabled = False
    3. Dir1.Enabled = False
    4. File1.Enabled = False
    5. Drive2.Enabled = False
    6. Dir2.Enabled = False
    7. origPath = Dir1.Path
    8. origFile = File1.FileName
    9. copyPath = Dir2.Path + "\" + origFile
    10. origBack = origPath + "\" + origFile
    11. FileCopy origBack, copyPath
    12. MsgBox ("copy complete")
    13. End Sub
    'Rarely is the question asked: Is our children learning?' George Bush

    visit my website @ www.freewebs.com/vbplanet

  16. #16
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: [RESOLVED] File copy error 75

    You took a trailing "\" off the source file. Forgot to mention it before, because it didn't show up in the screenie. Next time, just use debug.print to identify values.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width