View previous topic :: View next topic |
Author |
Message |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Mon Apr 22, 2013 11:28 pm Post subject: Windows copy dialog |
|
|
Is there a way to copy files/folders and show the windows copy dialog? API or VBScript maybe?
Thanks! _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Tue Apr 23, 2013 3:27 pm Post subject: |
|
|
I don't know if this can be done via api, if so look to kernel32.dll CopyFileW
For VBS
The target folder must be created prior to calling the vbs script.
Code: |
Const FOF_CREATEPROGRESSDLG = &H0&
strTargetFolder = "c:\myTarget"
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace(strTargetFolder)
objFolder.CopyHere "c:\mySource\*.*", FOF_CREATEPROGRESSDLG
|
|
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue Apr 23, 2013 8:44 pm Post subject: |
|
|
I gave that a quick try, it copies the files but does not show the progress dialog. _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Wed Apr 24, 2013 12:59 pm Post subject: |
|
|
Works in both my test, for Windows 7 and Windows XP...
Maybe try running it via wscript.exe test.vbs ?
Your script host might be set different than mine?
Extra slash? Can you post your .vbs source? |
|
Back to top |
|
|
|