WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ShellOp

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

ShellOp Extender File Copy Error

Keywords: 	  afilecopy

Question:

Why does the following code produce a "1026" file copy error:
AddExtender("wwsop34I.dll")

pause("","Copy Favorites ... no error")
src="c:\windows\favorites"
targ="d:\registry\favorites"
flags=0
afilecopy(src,targ,flags)

pause("","Copy Favorites ... with error")
src="c:\windows\favorites\"
targ="d:\registry\favorites\"
flags=0
afilecopy(src,targ,flags)

Answer:

Hmm. I don't have a clue what this really does. I think it depends if the "favorites" directory on the d: drive exists or not. If it does not exist I think it copies all the files and places them one at a time in a file called "favorites". Last file in wins.

I suspect you want...

src="c:\windows\favorites\*.*"
targ="d:\registry\favorites"
flags=0
afilecopy(src,targ,flags)

Question (cont'd):

The documentation implies that the "*.*" does only the directory, not the entire sub-tree. The second example in the docs is what I was going after ... and it seems to me the question is why the trailing "\" causes a "file copy error".

How does one do only a folder (rather than all subtrees), without its sub folders? Is that the intent of the flags=128?

More to the point why is the trailing "\" not a WinBatch runtime error, rather than a OS copy error? Why does the extender not add the *.* if that is what is needed to make it work?

Answer:

Yes, I think that is what the 128 flag does.

The extender passes your exact strings to the Windows API rountine. We've noticed it is very sensitive to what you specify, and attempted to document it somethat in the aFileCopy examples. As far as we can tell the API has some rules controlling what it does based on the strings provided, but can't find those rules documented.


Article ID:   W14197
Filename:   Shell Op Extender Copy Error.txt
File Created: 2001:03:01:15:24:32
Last Updated: 2001:03:01:15:24:32