Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWAREProgramming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old March 18th, 2008, 04:11 AM
vijayteegala vijayteegala is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 1 vijayteegala User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 35 sec
Reputation Power: 0
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?

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWAREProgramming > DOS Batch - Problems with my code in batch file (find and replace the value of variable)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT