|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|||
|
DOS Batch - Problems with my code in batch file (find and replace the value of variable)
--------------------------------------------------------------------------------
hi i wrote one batch file.that batch file will take input from the user and replace the value with existing value myBatchFile.bat ------------------------------------------------ @echo off set /p _name=Enter your name: echo Hello %_name%!. SET Filename=shell.rsp set FROM_LOCATION1=FROM_LOCATION="%_name%" echo %FROM_LOCATION1% setlocal enabledelayedexpansion for /f "tokens=* delims=" %%i in (%Filename%) do ( set input=%%i set input=!input:FROM_LOCATION=%FROM_LOCATION1%! echo !input! >> %Filename%.chg ) ren %Filename% %Filename%.old ren %Filename%.chg %Filename% del %Filename%.old -------------------------------------------------------------------- shell.rsp *************************************** #----------------------------------------------------------------------------- # Name : FROM_LOCATION # Datatype : String # Description : Complete path of the products.xml file from the staging area # where you untared your patch set. # Valid values : Full path ending in "products.xml" # Example value : "/patchset/oracle10g/stage/products.xml" # Default value : "../stage/products.xml" # Mandatory : Yes #----------------------------------------------------------------------------- FROM_LOCATION=<Value Required> **************************************** i am unable to replace the value of the FROM_LOCATION varible please help me to find the bug in my code? |
![]() |
| Viewing: Dev Hardware Forums > SOFTWARE > Programming > DOS Batch - Problems with my code in batch file (find and replace the value of variable) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|