-1

Editing this for clarity.

Code below for what I currently have in my .cmd file:

"C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\win32\asset_unpacker.exe" ^

"C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\assets\packed.pak" ^   //This caret is interpreted as an argument instead of as a line continuation command.

"C:\Users\Engineering\Documents\Design Projects\Starbound Unpacked"

cmd \k

Code below is what I want the output to be:

"C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\win32\asset_unpacker.exe" "C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\assets\packed.pak" "C:\Users\Engineering\Documents\Design Projects\Starbound Unpacked"

cmd \k

Thanks

MechE
  • 13
  • 4
  • Are you talking about `.cmd` files, which you run from the command prompt? If so, Notepad++ is just an editor and is irrelevant to the question. Also, why would you want to run it as if it is a single line? What is the difference? Can you show the commands so we get an idea of what you are trying to accomplish? – GolezTrol May 09 '15 at 22:31
  • You can split a batch command to multiple lines using the caret ^ as a line continuation if that's what you're asking. – Tony Hinkle May 09 '15 at 22:34
  • Sure, for convenience, I'm trying to create a file that runs a program from the command prompt just by clicking the file and it gives it the necessary inputs. I will edit my main post to display my current code to make my request more clear. I just don't want to type this command in the command prompt every time I want to run this program, and I want the code to look clean. It would be easy just to remove the enter's and have it all on one line, but that looks MESSY! – MechE May 09 '15 at 22:34
  • @Tony, close, but the command I'm executing recognizes the last caret as a location as if it were in quotes instead of as a caret. – MechE May 09 '15 at 23:00

2 Answers2

0

I'm not entirely sure of your question, but does this not do what you want?

@echo off
"C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\win32\asset_unpacker.exe"^
 "C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\assets\packed.pak"^
 "C:\Users\Engineering\Documents\Design Projects\Starbound Unpacked"
cmd \k

Note the trick pointed out by Wayne to include a space at the start of the lines which immediately follow the caret (^). Without this your command would be as follows which would be invalid:

"C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\win32\asset_unpacker.exe""C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\assets\packed.pak""C:\Users\Engineering\Documents\Design Projects\Starbound Unpacked"

Alternatively, could you not just turn on word wrap in notepad++?

Community
  • 1
  • 1
akiller
  • 2,387
  • 21
  • 29
  • HA HA! I just posted this as well. Thanks though, you get the best answer reward. I am aware of word wrap, but word wrap won't start new rows exactly where you want them to start. – MechE May 09 '15 at 23:47
0

For any of you that want to do this as well for easy editing, here's how you have multiple rows run as a single line on the command prompt:

This is my code:

"C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\win32\asset_unpacker.exe"^
 "C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\assets\packed.pak"^
 "C:\Users\Engineering\Documents\Design Projects\Starbound Unpacked"
cmd \k

This is my output:

"C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\win32\asset_unpacker.exe" "C:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable\assets\packed.pak" "C:\Users\Engineering\Documents\Design Projects\Starbound Unpacked"

The main point is that you need to put the caret symbol on the code BEFORE you add a space if you want to extend your line to multiple rows on the command prompt.

MechE
  • 13
  • 4