Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 3

XCopy error 0x80070003

When attempting to use XCopyFile to copy files to a backup folder, I get this error code (0x80070003 - The system cannot find the file specified). This only happens if I have files with the following characters in their filename:


Removing all files with those characters does not cause the error to occur. Any help would be appreciated.

We are using InstallShield 2010 with SP1 and hotfix for Windows 2000 install.

Thank you
Labels (1)
0 Kudos
(5) Replies
Level 13

The tilde is probably doing it.
Probably would fail with spaces and a few other chars in filespec.
Try putting quotes around the filespec.
Let us Know.
0 Kudos
Level 3

Sorry made mistake in original post - we are using XCopyFile API from InstallShield not XCopy.

I do not copy files individually

The call to XCopyFile is:

XCopyFile("*.*", "*.*", INCLUDE_SUBDIR)

where the TARGETDIR and SRCDIR were saved via VarSave and restored afterwards via VarRestore
0 Kudos
Level 7

Are you running on Windows 2000? Make sure you have all the code pages installed. My guess is that the characters you mention are not in the active code page, so InstallScript copy fails.

Also, private me your e-mail if you are interested in Beta testing the latest InstallScript.
0 Kudos
Level 3

Not running on Win2k - this is on Vista

On a similar note, during an upgrade of our software, we read and write to ini files using GetProfString and WriteProfString

The same string ("ßäµ≈") is changed to ("ßäµ~") during that upgrade process.

What happens is that the string is read from the ini file using GetProfString, a string concatenation happens to add another value (e.g "ßäµ≈, Test") and the concatenated string gets written using WriteProfString but the "ßäµ≈" is changed to "ßäµ~".

I verified that the ≈ is in the character map (0x2248) but the ~ character (0x02dc) is not.
0 Kudos
Level 3

Hey, to fix the error 0x80070003, you need to repair and restore broken system files. This can be done by opening Command Prompt with admin privileges and go for the following commands one after another: SFC /scannow DISM /Online /Cleanup-Image /CheckHealth, DISM /Online /Cleanup-Image /ScanHealth, DISM /Online /Cleanup-Image /RestoreHealth . After that, restart your PC and look for the updates once again. This will probably resolve the issue; if it doesn't, you can run the update troubleshooter. To do that, you can disconnect all the peripherals linked to your PC and start your machine again. Now go to Settings and choose the option of Update and Security. Just tap on Troubleshoot and tap on View, an additional troubleshooter. In the end, search and run the Update troubleshooter and check out the updates and you are good to go.

0 Kudos