|
-
Nov 26th, 2009, 11:35 AM
#13
Thread Starter
Addicted Member
Re: Create Directory Problem
 Originally Posted by mickey_pt
Maybe the problem it's because the FileInfo class...
Try this instead:
vb.net Code:
Dim path As String = IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "pdf\nietverzonden")
Dim filesToMove As String() = IO.Directory.GetFiles(path, "*.pdf", IO.SearchOption.AllDirectories) 'or IO.SearchOption.TopDirectoryOnly
For Each file As String In filesToMove
Dim filename As String = IO.Path.GetFileName(file)
Dim newFile As String = IO.Path.Combine(DirConstr, filename)
IO.File.Move(file, newFile)
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|