graysky Posted November 5, 2006 Share Posted November 5, 2006 Is there a way I can start the windows xp copy or move command rather than using the DOS command? (I.e. launch whatever exe windows uses when a user does a drag-and-drop that will invoke the standard "Copying ..." dialogbox? Link to comment Share on other sites More sharing options...
allen2 Posted November 5, 2006 Share Posted November 5, 2006 I don't there is a standalone dll or .exe which is used to copy from drag and drop. Explorer.exe handle this task by itself. Link to comment Share on other sites More sharing options...
Ctrl-X Posted November 5, 2006 Share Posted November 5, 2006 Copy/move operations that show the progress dialog can be scripted using a Shell.Application object. VBScript example:CreateObject("Shell.Application").NameSpace("C:\Target").CopyHere "C:\Source"This will copy the C:\Source folder to the C:\Target folder (resulting in a C:\Target\Source folder). Link to comment Share on other sites More sharing options...
gunsmokingman Posted November 5, 2006 Share Posted November 5, 2006 (edited) Here is a VBS Script that1:\ Inputbox to set the Copy To Spot, if the Cancel Button is pressed or no text was detectedit will produce a Message Box then quit.2:\ Inputbox to set the Copy From Spot, if the Cancel Button is pressed or no text was detectedit will produce a Message Box then quit.3:\ It then checks to see if the folder for the Copy To Spot exists if the Folder does not exists thenit makes the Folder for the Copy To SpotSave As ShellCopy.vbsConst moveOrRenameTrue = 8, yesToAll = 16, displayProgress = 256, noConfirmDirCreate = 512 Dim CopyToSpot, CopyFrom, Fso, Shell, Text Set Fso = CreateObject("Scripting.FileSystemObject") Set Shell = CreateObject("Shell.Application") Text = "The User Has Selected To Quit And Not Copy Nothing" & vbCrLf &_ "Or There Was No Path Given For The File Or Folder"'/-> The Folder Where You Want To Copy To CopyToSpot = InputBox("Type In The Path To Copy To " & vbCrLf &_ "Example : C:\SomeFolder" ,"Copy To Spot",,5500,4800) If CopyToSpot <> "" Then '/-> The File Or Folder That Goes To The CopyToSpot CopyFrom = InputBox("Type In The Path Of The File Or Folder That You Want " &_ "To Copy To This Location " & CopyToSpot, "Copy From",,5500,4800) If CopyFrom <> "" Then '/-> If The CopyToSpot Does Not Exists It Makes The Folder For The CopyToSpot If Not Fso.FolderExists(CopyFrom) Then Fso.CreateFolder(CopyFrom) End If Shell.NameSpace(CopyToSpot).CopyHere(CopyFrom),yesToAll + displayProgress Else '/-> This Is Cancel Or No Text Was Detected From The CopyFrom InputBox MsgBox Text, 0 + 32 + 4096,"User Cancel" End If Else '/-> This Is Cancel Or No Text Was Detected From The CopyToSpot InputBox MsgBox Text, 0 + 32 + 4096,"User Cancel" End If Edited November 5, 2006 by gunsmokingman Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now