Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing ^ in a filename

Status
Not open for further replies.

tasminracer

IS-IT--Management
Feb 7, 2003
43
0
0
GB
Hi, I have a system that outputs files in the format

JOBAAnn1234-12^123456 with the last set of numberics being a phone number and hence vaiable length.

I need to do some processing on that file before it passes to the next system so Im using some batch files.

the first program is a for loop that reads the file names and passes them to the next program that does the work.

The trouble is when the variable is passed into the 2nd program it looses the ^ and becomes JOBAAnn1234-12123456 which obviously doesnt exist.

I've tested this by piping the passes filename into echo and it displays without the ^.

What i'd like to do is change the source filename to have a £ rather than the ^ ( i can control the output file name, and the £ works fine)

Process my file and then rename it replacing the £ with the ^.

Trouble is I cant seem to find a way to do this as part of a batch file. any ideas

cheers

Graham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top