>>Shell.Application is fully supported for anything with Shell32.DLL version 4.71 or later, including Win98se
>
>On my system - NT4.0wks sp4 with Ie4.0 sp1 - version of shell32.dll is 4.0 and code works.
>
>>NameSpace is a METHOD not a property, and the return from invoking Shell.Application's NameSpace method will be a folder object for the vDir argument. If vDir doesn't exist, or isn't a valid folder (for example, a domain or a nonexistant directory) then the NameSpace method can't return a folder object. You must specify a value for the vDir, and must test the return type to make sure its an object.
>
>I supply a value for vDir that is sure valid.
>
>I use this:
>
>winfile=createobject("Shell.Application") && on systems without IE4 get error class not registered but not in Win98se
>fileto="c:\folder1\file1.ext" && folder exist but file no
Your error is here - the destination must exist and be a valid folder. The following sample of code works just fine:
ox=createobj('shell.application')
md c:\test1
cx = getf()
ox.namespace('c:\test1').CopyHere(cx)
If you need to rename files during the copy, use the Scripting.FileSystemObject which is a part of WSH, or use CopyHere as I showed above, get a FolderItem back from NameSpace using either the Items collection or the ParseName method for the copied file and use the FolderItem's Name property to rename it.
>filefrom="x:\folderx\file1.ext" && folder and file exist
>winfile.namespace(fileto).copyhere(filefrom) && on win98se namespace is not object