Quote Originally Posted by mickey_pt View Post
Maybe the problem it's because the FileInfo class...

Try this instead:
vb.net Code:
  1. Dim path As String = IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "pdf\nietverzonden")
  2.         Dim filesToMove As String() = IO.Directory.GetFiles(path, "*.pdf", IO.SearchOption.AllDirectories) 'or IO.SearchOption.TopDirectoryOnly
  3.         For Each file As String In filesToMove
  4.             Dim filename As String = IO.Path.GetFileName(file)
  5.             Dim newFile As String = IO.Path.Combine(DirConstr, filename)
  6.             IO.File.Move(file, newFile)
  7.         Next
Nop dos not work i still get this error: The process cannot access the file because it is being used by another process.

Regards Me