- 
	
	
		
		
			
				
				
				
					
 Input string with space in dos batch
					
				
				
						
						
				
					
						
							I've narrowed it down to this question:
"In a dos prompt batch input file, how do you input a string that has a space?"
Eg (simplied to illustrate the point):
Say you have a file input.txt
input.txt has the following lines
"telephone"
"caterpillar"
"boeing airplane"
If you were to run the following batch:
for /f %%i in (input.txt) do (
@echo %%i
)
You will get the following :
"telephone"
"caterpillar"
"boeing
Where's the " airplane"??  It doesn't get picked up by echo!
However if you typed in dos prompt echo "boeing airplane" it would output:
boeing airplane
aieee~
						
					 
					
				 
			 
			
			
				
				
				
					
						Last edited by Peegee; 06-08-2009 at 07:31 PM.
					
					
						Reason: wtf I thought I wrote the title properly
					
				
				
				
				
				
				
				
			 
			
			
		 
	 
		
	
 
		
		
		
	
 
	
	
	
	
	
	
	
	
	
	
	
	
		
		
			
				
				Posting Permissions
			
			
				
	
		- You may not post new threads
 
		- You may not post replies
 
		- You may not post attachments
 
		- You may not edit your posts
 
		-  
 
	
	
	Forum Rules