-
Like windows, you can move around folders and files by saying "move" and the file will just change directory names instead of a copy, paste, and delete that occurs when you are, say, moving a file to a server. Well, I have different drive names within a server, for example, drive X:/ , Y:/ , and Z:/ all are on the same server volume. I have the task of creating a GUI that moves files around in the server without them coping, pasting and then deleting. I have a DOS program called ncopy that does this, but it's not a GUI. I need help with the programming... is there a way to see the programming language in the DOS of NCopy and make it into a GUI for windows? Help!! Thanks!!
~Brian
-
Code:
Private Declare Function MoveFile Lib "kernel32" Alias "MoveFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String) As Long
Private Sub Command1_Click()
MoveFile "c:\file", "c:\newfile"
End Sub
-
That still won't do it. I think he wants to move files which are physically on the same server, but they have different drive associations. As it can't tell, it copies rather than moves. If you work back from the drive name to find the original device, you can move it under the same subtree. Sorry if this makes no sense :).
-
Then have a look at the FileSystemObject object. It has methods called MoveFolder, CopyFolder, MoveFile and CopyFile that can act like DOS ncopy or xcopy.
Good luck!