Filecopy("c:\xx.txt","\\Lan\Folder\xx.txt") error

I need to replace File of Share folder.

But I show Error as "Process can not access to file \\Lan\Folder\xx.txt it is being used by another process"

That I am sure that File is not used and Folder is share Full access.

Please help.

PS : Other Function such as Kill("\\Lan\Folder\xx.txt") also Error.



Answer this question

Filecopy("c:\xx.txt","\\Lan\Folder\xx.txt") error

  • RepliCrux

    Thank you for your reply.

    Yes , it can not. With Map drive also can not.


  • chaudakh

    Can you delete the file using Windows Explorer when your application is running

  • chrisj13475

    Thank you very much for your reply.

    I can delete file by Exploror. So I think that it does not come from SheringPermission.

    Please Try to help me.


  • Raph

    I would check with your Network Administrator. He/she should be able to tell you who has the file open.

    If you believe it's a process on your machine you could always use the free Process Explorer utility:

    http://www.sysinternals.com/Utilities/ProcessExplorer.html



  • B_a_s_i_c

    OK, so if your application is running you cannot delete the file with Windows Explorer, correct

    If you then close your application can you delete the file with Windows Explorer



  • DavidGalaxy

    It can not delete both open or not open explorer.

    I just remember that it occured with some my project of VB6. But I correct by change function to be 'Name {old file} as {new file}'. I am not sure Name is function or what becuase I can not serch in object browser of VB6. But it is work.


  • Filecopy("c:\xx.txt","\\Lan\Folder\xx.txt") error