Find *.lnk IN "C:\ProgramData\Microsoft\Windows\Start Menu" OR "C:\Users\jose.nunes\AppData\Roaming\Microsoft\Windows\Start Menu" RECURSE=yes COLLNAME result
Copy "coll://result/" TO "C:\atalhos\*" UPDATEALL
The Copy command doesn't work. If I execute the copy command alone it reports errors of the type
"An error occurred copying 'file xxx' : The filename, directoy name, or volume label syntax is incorrect (123)"
There is no problem if I copy using the find window.
"OR" isn't one of the Find command's arguments and is probably making the Find line try to search a folder named "OR" in this case.
The Find line may not be doing what you expect. If you run that line on its own and look at the "result" collection, does it contain the things you expect?
With the copy line, the wildcard is in the wrong place:
Copy "coll://result/" TO "C:\atalhos*" UPDATEALL
The wildcard should be at the end of the source, not the destination, to say you want to copy all files below the source folder directly into the destination folder:
Taking a step back from the command itself, what's the overall aim?
[ul][li]It looks like you want to create a flattened copy of all shortcuts in your start menu, is that correct?
[/li]
[li]Is that the end goal or an intermediate step toward making something else?
[/li]
[li]Do you want the copy to be flattened, or would you prefer it to keep the start menu's folder hierarchy?[/li][/ul]
Depending on exactly want you want to do, I think there will be a better way than using the Find & Copy combination. I was going to suggest that after getting the existing idea to work, but it might be quicker & easier to skip straight to it.
[code]Go "C:\ProgramData\Microsoft\Windows\Start Menu"
Set FLATVIEW=mixednofolders,on
Select *.lnk
COPY TO C:\atalhos FLATVIEWCOPY=single UPDATEALL
Go "C:\Users\jose.nunes\AppData\Roaming\Microsoft\Windows\Start Menu"
Set FLATVIEW=mixednofolders,on
Select *.lnk
COPY TO C:\atalhos FLATVIEWCOPY=single UPDATEALL[/code]
[code]Go "C:\ProgramData\Microsoft\Windows\Start Menu"
Set FLATVIEW=mixednofolders,on
Select *.lnk
COPY TO C:\atalhos FLATVIEWCOPY=single UPDATEALL
Go "C:\Users\jose.nunes\AppData\Roaming\Microsoft\Windows\Start Menu"
Set FLATVIEW=mixednofolders,on
Select *.lnk
COPY TO C:\atalhos FLATVIEWCOPY=single UPDATEALL[/code][/quote]