Erroneous "Nothing to do" message

Erroneous "Nothing to do" message

Postby GCRaistlin » 04.04.2019, 14:08

If "Copy updates for selected products into directory" is checked but the specified directory doesn't exist we get "Nothing to do" message.
GCRaistlin
 
Posts: 39
Joined: 06.03.2018, 21:45

Re: Erroneous "Nothing to do" message

Postby Dalai » 04.04.2019, 21:00

Do you get a message showing "Error copying files for ..." (probably before "Nothing to do")?

Regards
Dalai
Dalai
 
Posts: 861
Joined: 12.07.2016, 21:00

Re: Erroneous "Nothing to do" message

Postby GCRaistlin » 04.04.2019, 21:09

No.
GCRaistlin
 
Posts: 39
Joined: 06.03.2018, 21:45

Re: Erroneous "Nothing to do" message

Postby GCRaistlin » 15.04.2019, 20:53

The issue still exists in 11.6.2.
GCRaistlin
 
Posts: 39
Joined: 06.03.2018, 21:45

Re: Erroneous "Nothing to do" message

Postby Dalai » 15.04.2019, 21:44

UpdateGenerator could create the directory (AutoIT function DirCreate()). If that fails, it should tell the user about it. In all other cases, it should show the message as it is now.

Regards
Dalai
Dalai
 
Posts: 861
Joined: 12.07.2016, 21:00

Re: Erroneous "Nothing to do" message

Postby hbuhrmester » 15.04.2019, 22:10

My guess would be:

UpdateGenerator.exe uses the script CopyToTarget.cmd to copy the selected product to a target, typically a directory on a USB drive.

There is no error message "Nothing to do" in the script CopyToTarget.cmd, so this message must come directly from xcopy.

xcopy is only called once throughout the script:

Code: Select all
rem *** Copy client tree ***
if not exist %SystemRoot%\System32\xcopy.exe goto NoXCopy
echo Copying client tree for %1 %2 %3 %4 %5 %6 %7 %8 %9...
for %%i in (%USB_FILTER%) do (
  pushd "%%~dpi"
  %SystemRoot%\System32\xcopy.exe "%~dp0..\client\*.*" %OUTPUT_PATH% /D /E /I /Y /EXCLUDE:%%~nxi
  if errorlevel 1 (
    popd
    if exist %USB_FILTER% del %USB_FILTER%
    goto XCopyError
  )
)
popd


I don't exactly know, what this fragment does. There is a loop, and it seems to change directories with pushd/popd. Then it calls xcopy from each directory, presumably to copy the contents.

Interestingly, the destination directory is an optional argument. The documentation says:

Default value for Destination

If you omit Destination, the xcopy command copies the files to the current directory.


https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc771254%28v%3dws.11%29

This would means, that xcopy copies the files back to the same directory. But the other options mean, that only new and changed files should be copied. Since source and destination directory are the same, there are no new or changed files. So xcopy concludes, that there is "nothing to do".

So the script CopyToTarget.cmd should check:

  • if the specified path exists
  • if the variable %OUTPUT_PATH% is set

Regards,
hbuhrmester
hbuhrmester
 
Posts: 369
Joined: 11.10.2013, 20:59

Re: Erroneous "Nothing to do" message

Postby Dalai » 15.04.2019, 23:30

@hbuhrmester:
"Nothing to do" is shown by UpdateGenerator, not some script.

Regards
Dalai
Dalai
 
Posts: 861
Joined: 12.07.2016, 21:00


Return to Verschiedenes / Miscellaneous

Who is online

Users browsing this forum: No registered users and 6 guests