Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileSystemObject progress GUI not showing 2

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I have used a FileSystemObject to copy a file from one network drive to another.

According to MSDN if you use a 'showUI' argument, a progress GUI should be displayed.

I have hunted the web to find what UIOption.AllDialogs is enumerated to and it appears to be a 3, so use that as the argument..

Code:
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile sLocal, sWord, 3

But the GUI isn't displayed, have I used the correct enumeration? and if so why doesn't the GUI display?

Thanks,

1DMF.

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
Seems like you misread MSDN.
The 3rd parameter of the Copyfile method is a boolean flag for overwrite the destination.
I guess you confuse the CopyHere method, eg:
Code:
Set SA = CreateObject("Shell.Application")
Set dest = SA.NameSpace("\path\to\destination)
dest.CopyHere "\path\to\source", 16

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
OOps, sorry for the typo in my suggestion:
[ccde]Set SA = CreateObject("Shell.Application")
Set dest = SA.NameSpace("\path\to\destination")
dest.CopyHere "\path\to\source", 16[/code]

furthermore, I didn't see any mention of FileSystemObject in the MSDN page you posted.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That is the .NET FileSystem (object), as opposed to the Scripting FileSystemObject. They are two very different things, as PHV was gently trying to hint.
 
hmm, I did a search in G! for 'file system object' and got that, I thought a 'file system' object in windows is a 'file system' object in windows, but it seems there are multiple 'file systems' in windows and they are not all equal?

Talk about confusing!

If you are pluging into the windows API 'system file' why does it matter what language you are using?

I really don't get what the hell it is i'm pluggin into sometimes!

As for using shell, I get 'object variable with block variable not set - 91'

Code:
Dim SA As Object
Dim SADest As Object
Set SA = CreateObject("Shell.Application")
Set SADest = SA.NameSpace(sWord)
SADest.CopyHere sLocal, 16

Your example isn't clear where filename goes, sWord and sLocal are drive:\path\filename.extension

Is this correct?



"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
sWord should be the path of the destination directory
sLocal should be the pathname of the source directory or file.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
>Where is the GUI meant to appear as a syscmd green bloby thing or a normal explorer copy GUI dialog?

It's the explorer copy GUI dialog. Mind you, if the file is relatively small it won't appear because the copy finished too quickly.
 
Thanks guys, appreciated.

It is a small file, but I think for our remote users this GUI progress bar will be visible and of use.

I will do some testing and let you kow.

1DMF.

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top