bat file echos multiple lines

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



bat file echos multiple lines



i am trying to create a script to get some code from pastebin or something like that but i ran in to a problem with @echo off at the beginning of the file(is doesn't matter if the rest of the file work for now but the problem with echo is realy irritating)



my code is this


@Echo off

set bin=http://www.pastebin.com/raw/%1

set nam=%1.bat

bitsadmin /transfer myJob /download /priority normal %bin% %nam%

start %nam%

del %nam%

pause



and the output is


offset bin=http://www.pastebin.com/raw/%1set nam=%1.batbitsadmin /transfer myJob /download /priority normal start del pause



for some reason (i used both notepad and notepad++ rot if it is like that nppp inserts weird newline characters of something but other code does work...)



but


@echo off

set hoi=rgrgae

REM keymash

Echo %hoi%

pause



does work?



it might be just some obvious thing that i missed if so sorry





Perhaps you should make sure your batch file is using WindowsCRLF line endings as opposed to MAC's CR style. As a side note, you should be using Call with %nam% not Start.
– Compo
Aug 6 at 10:53


CRLF


CR


Call


%nam%


Start





@Compo how do i change the line endings??
– ad zwemer
Aug 6 at 11:18





@adzwemer, you said you used Notepad++. Surprised you have never seen that option. It also has the ability to show you the line endings while editing the file.
– Squashman
Aug 6 at 12:05






I believe that the latest version of notepad in Windows 10, supports different EOL endings if the text containing them is pasted into it, (subject to the registry not being altered to prevent it). So my advice is dont paste text into notepad if using the latest version in Windows 10, and if you don't know what line ending it is using, (if you choose View>Status Bar, it may indicate the line ending when pasted). To change the line endings in NotePad++, I'd also assume that the option is available in the Menu, probably View>EOL Conversion>Windows Format, or similar.
– Compo
Aug 6 at 12:41



notepad


Windows 10


EOL


notepad


Windows 10


View


Status Bar


NotePad++


Menu


View


EOL Conversion


Windows Format









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered