|
-
Aug 17th, 2000, 11:29 AM
#1
Thread Starter
Lively Member
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
-
Aug 19th, 2000, 02:56 AM
#2
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
-
Aug 19th, 2000, 06:40 AM
#3
Monday Morning Lunatic
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 .
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 19th, 2000, 06:46 AM
#4
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!
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
|