tags:

views:

22

answers:

1

hi

THis is my code

for /l %%i in (1, 1, %N%) do (
echo !v%%i!
for /f "tokens=* delims=" %%l in ("!v%%i!") do (    
echo %%l >> Linux.cpp     ) 
)

Here i want to copy data in %%l to linux.cpp file Now what happening is if %%l contain abc.cpp this name is stored in linux.cpp. Here i want to store contents in abc.cpp to linux.cpp.

Please help

+1  A: 

If you want the contents of the file to be appended to Linux.cpp then use type (which displays the contents of a file) instead of echo.

e.g. type %%l >> Linux.cpp

mikej
Thanks for your help.. Its copying the dat ain file but my intension is to delete CR from windows file.By giving echo only its deleting CR. In type its not deleting carriage return
If i give sample.cpp instead of ("!v%%i!") in for loop its working perfectly.Please help what may be the error