From 860ab63aee869472b24a27949515ced67ded88eb Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 30 Oct 2002 19:02:15 +0000 Subject: [PATCH] added rename Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@467 --- src/shell/shell.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 1f7bed15..b99e3424 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -96,11 +96,15 @@ void DOS_Shell::ParseLine(char * line) { void DOS_Shell::Run(void) { char input_line[CMD_MAXLINE]; std::string line; - if (cmd->FindString("/C",line,true)) { - strcpy(input_line,line.c_str()); - line.erase(); - return; - } + + if (cmd->FindString("/C",line,false)) { + char command[256]; + cmd->GetFullLine(command); + char * blah=strstr(command, "/C"); + blah+=2; //add the size of "/C" + ParseLine(blah); + return; + } /* Start a normal shell and check for a first command init */ WriteOut(MSG_Get("SHELL_STARTUP")); if (cmd->FindString("/INIT",line,true)) { @@ -216,7 +220,8 @@ void SHELL_Init() { MSG_Add("SHELL_CMD_GOTO_HELP","Jump to a labeled line in a batch script.\n"); MSG_Add("SHELL_CMD_TYPE_HELP","Display the contents of a text-file.\n"); MSG_Add("SHELL_CMD_REM_HELP","Add comments in a batch file.\n"); - + MSG_Add("SHELL_CMD_RENAME_WILD","This is a simple Rename, no wildcards allowed!\n"); + MSG_Add("SHELL_CMD_RENAME_HELP","Renames files.\n"); /* Regular startup */ call_shellstop=CALLBACK_Allocate();