Member Avatar

Hi, I installed Windows 8. I have write a personal script (.bat file) which worked with Windows 7 perfect. The problem on Windows 8 is: My script executes this command: xcopy "D:\X" "D:\E" /S /E /I /Q /H /K /O /X xcopy is Windows's copy command. "D:\X" is source directory "D:\E" is destination direcotory /S /E /I /Q /H /K /O /X are other parameters. I got "access denied" error. I check the properties of the directories "D:\X" and "D:\E". On the "security" tab of properties, "Authenticaed Users", "SYSTEM", "Administrators" ve "Users (computerName/Users)" all got "Full control" enabled. I got …

Member Avatar
0
7
Member Avatar

I am trying to copy the contents of a folder into another folder in another drive using XCOPY. Here is code I have now but it isn't working and I figure xcopy would be the easier way to go because MOVETO and CopyDirectory haven't been working because its copying files to a different directory. [CODE]Sub CopyFiles() Dim DestinationDirectory As String = "I:\New\Export\ID" Dim SourceDirectory As String = "C:\Temp2\" Try Dim f() As String = Directory.GetFiles(SourceDirectory) For i As Integer = 0 To UBound(f) File.Copy(f(i), DestinationDirectory & "\" & SourceDirectory(f(i))) Next Catch ex As Exception End Try End Sub[/CODE]

Member Avatar
0
28

The End.