Home > OS >  Copy a file in Post Build of Eclipse/Truestudio
Copy a file in Post Build of Eclipse/Truestudio

Time:07-27

I was using arm-objcopy but it doesn't work with my .h file I need to copy to another project.

xcopy "../${project_loc}/src/folder/file.h" "....\OtherProject\folder\folder2\file.h" /Y

The error I get is "Invalid number of parameters". Earlier it was working enough to delete the existing file and ask "Is this File or Directory". /Y is supposed to quiet that according to xcopy docs, but then I find Copy file(s) from one project to another using post build event...VS2010 which suggests otherwise? Either way it didn't let the copy happen quietly.

Project_loc from What are the predefined variables in eclipse?

I would've thought this wouldn't take an hour. Google disagrees with me.

Edit

I flipped the first set of / to \ and now I'm back to

Does ....\Project\folder\folder2\file.h specify a file name or directory name on the target (F = file, D = directory)?

CodePudding user response:

xcopy "${ProjDirPath}\src\folder\file.h" "..\..\OtherProject\folder\folder2\file.h" /Y

I had a typo somewhere in the destination, but I used ${ProjDirPath} as ${Project_loc} did not exist for the source.

  • Related