This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
"${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd2000.exe" "${CG_TOOL_ROOT}/bin/hex2000.exe" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"
"${copy_PARENT}/rename"
调用renam脚本时报错 ,直接执行rename脚本功能正常
报错信息
所在位置 行:1 字符: 2
+ (Get-Item YLD200_28S5.bin).LastWriteTime.ToString('yyMMdd_HHmm')
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (E:\SVN_CHECK\03...YLD200_28S5.bin:String) [Get-Item], ItemNotFoundExcep
tion
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
不能对 Null 值表达式调用方法。
所在位置 行:1 字符: 1
+ (Get-Item YLD200_28S5.bin).LastWriteTime.ToString('yyMMdd_HHmm')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [],RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
系统找不到指定的文件。
Get-Item : 找不到路径“E:\SVN_CHECK\03Project_Code\01Source\YLD200-28S5\Prj\YLD200_28S5\YLD200_28S5.out”,因为该路径不
存在。
所在位置 行:1 字符: 2
+ (Get-Item YLD200_28S5.out).LastWriteTime.ToString('yyMMdd_HHmm')
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (E:\SVN_CHECK\03...YLD200_28S5.out:String) [Get-Item], ItemNotFoundExcep
tion
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
不能对 Null 值表达式调用方法。
所在位置 行:1 字符: 1
+ (Get-Item YLD200_28S5.out).LastWriteTime.ToString('yyMMdd_HHmm')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [],RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
系统找不到指定的文件。
Get-Item : 找不到路径“E:\SVN_CHECK\03Project_Code\01Source\YLD200-28S5\Prj\YLD200_28S5\YLD200_28S5.hex”,因为该路径不
存在。
所在位置 行:1 字符: 2
+ (Get-Item YLD200_28S5.hex).LastWriteTime.ToString('yyMMdd_HHmm')
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (E:\SVN_CHECK\03...YLD200_28S5.hex:String) [Get-Item], ItemNotFoundExcep
tion
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
不能对 Null 值表达式调用方法。
所在位置 行:1 字符: 1
+ (Get-Item YLD200_28S5.hex).LastWriteTime.ToString('yyMMdd_HHmm')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [],RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
系统找不到指定的文件。
Get-Item : 找不到路径“E:\SVN_CHECK\03Project_Code\01Source\YLD200-28S5\Prj\YLD200_28S5\YLD200_28S5.map”,因为该路径不
存在。
所在位置 行:1 字符: 2
+ (Get-Item YLD200_28S5.map).LastWriteTime.ToString('yyMMdd_HHmm')
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (E:\SVN_CHECK\03...YLD200_28S5.map:String) [Get-Item], ItemNotFoundExcep
tion
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
不能对 Null 值表达式调用方法。
所在位置 行:1 字符: 1
+ (Get-Item YLD200_28S5.map).LastWriteTime.ToString('yyMMdd_HHmm')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [],RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
系统找不到指定的文件。
gmake[2]: [post-build] Error 1 (ignored)
这个是rename 脚本内容,功能非常简单,就把生成的文件改个名。通过post-build执行就不行 直接执行就正常
@echo off set bin_name=YLD200_28S5 :: 以下内容不修改!!!! for /f "usebackq" %%i in (`powershell "(Get-Item %bin_name%.bin).LastWriteTime.ToString('yyMMdd_HHmm')"`) do set time=%%i ren "%bin_name%.bin" "%bin_name%_%time%.bin" for /f "usebackq" %%i in (`powershell "(Get-Item %bin_name%.out).LastWriteTime.ToString('yyMMdd_HHmm')"`) do set time=%%i ren "%bin_name%.out" "%bin_name%_%time%.out" for /f "usebackq" %%i in (`powershell "(Get-Item %bin_name%.hex).LastWriteTime.ToString('yyMMdd_HHmm')"`) do set time=%%i ren "%bin_name%.hex" "%bin_name%_%time%.hex" for /f "usebackq" %%i in (`powershell "(Get-Item %bin_name%.map).LastWriteTime.ToString('yyMMdd_HHmm')"`) do set time=%%i ren "%bin_name%.map" "%bin_name%_%time%.map"