Click here to Skip to main content
16,004,828 members
Home / Discussions / C#
   

C#

 
GeneralRe: Design question with message sending Pin
hansipet13-Jun-07 20:09
hansipet13-Jun-07 20:09 
GeneralRe: Design question with message sending Pin
mav.northwind14-Jun-07 10:31
mav.northwind14-Jun-07 10:31 
QuestionUser control that cannot be resized Pin
mkorin13-Jun-07 8:10
mkorin13-Jun-07 8:10 
AnswerRe: User control that cannot be resized Pin
andreumv13-Jun-07 10:46
andreumv13-Jun-07 10:46 
GeneralRe: User control that cannot be resized Pin
mkorin13-Jun-07 11:35
mkorin13-Jun-07 11:35 
AnswerRe: User control that cannot be resized Pin
Martin#14-Jun-07 4:18
Martin#14-Jun-07 4:18 
Questionhow to attach database object to textwriter Pin
ksrs13-Jun-07 8:07
ksrs13-Jun-07 8:07 
QuestionCommand Line Process Execution [modified] Pin
Justin Perez13-Jun-07 7:38
Justin Perez13-Jun-07 7:38 
I have a utility that adds carriage returns and line feeds into text files. What i want to do is gather an arry of those text files, and pass them one by one into this executable. All seems to be working fine, but when I try to do a Process.Start() I keep getting an arguments exception. Does anyone have any insight? Here is a code snippet..

string strCRLFArgs = string.Empty;
string strCRLFLoc = string.Empty;
// Set Full filename of CRLF utility
strCRLFLoc = string.Format(@"{0}\crlf.exe", (string)m_config.GetSetting("CRLFDir"));

// Get directory of raw data files
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo((string)m_config.USPSGetSetting("ImportDir"));

// Create an array of all the files
FileInfo[] fi = di.GetFiles("*.TXT", SearchOption.TopDirectoryOnly);

// Loop through the collection of files, and pass them through CRFLF
for (int i = 0; i < fi.Length; i++)
{
    FileInfo fiTemp = fi[i];
    // Set args to CRLF ImportDirectory\TXT#.txt 182
    strCRLFArgs = string.Format(@"CRLF {0}\{1} 182", (string)m_config.GetSetting("ImportDir"), fiTemp);

    crlfProcess.StartInfo.FileName = strCRLFLoc;
    crlfProcess.StartInfo.Arguments = strCRLFArgs;
    crlfProcess.StartInfo.UseShellExecute = false;
    crlfProcess.StartInfo.CreateNoWindow = true;
    crlfProcess.StartInfo.RedirectStandardOutput = true;
    crlfProcess.Start();


The arguments for running it as a regular command line utility are CRLF ImportDirectory\TXT#.txt 182. Would this stay the same if I'm setting the process to that executable. Any insight would be great. Thanks =)


-- modified at 13:47 Wednesday 13th June, 2007 - Didn't use

sorry =)
AnswerRe: Command Line Process Execution Pin
Luc Pattyn13-Jun-07 7:56
sitebuilderLuc Pattyn13-Jun-07 7:56 
GeneralRe: Command Line Process Execution Pin
Justin Perez13-Jun-07 8:16
Justin Perez13-Jun-07 8:16 
GeneralRe: Command Line Process Execution Pin
Luc Pattyn13-Jun-07 9:21
sitebuilderLuc Pattyn13-Jun-07 9:21 
QuestionProblem using ProgressBar or other informative control... Pin
Khoramdin13-Jun-07 7:34
Khoramdin13-Jun-07 7:34 
AnswerRe: Problem using ProgressBar or other informative control... Pin
Giorgi Dalakishvili13-Jun-07 7:46
mentorGiorgi Dalakishvili13-Jun-07 7:46 
AnswerRe: Problem using ProgressBar or other informative control... Pin
Ed.Poore13-Jun-07 7:52
Ed.Poore13-Jun-07 7:52 
AnswerRe: Problem using ProgressBar or other informative control... Pin
Justin Perez13-Jun-07 7:52
Justin Perez13-Jun-07 7:52 
QuestionCombination console/form app Pin
eosisms13-Jun-07 7:29
eosisms13-Jun-07 7:29 
AnswerRe: Combination console/form app Pin
Ed.Poore13-Jun-07 7:53
Ed.Poore13-Jun-07 7:53 
AnswerRe: Combination console/form app Pin
MidwestLimey13-Jun-07 13:27
professionalMidwestLimey13-Jun-07 13:27 
AnswerRe: Combination console/form app Pin
eosisms14-Jun-07 8:56
eosisms14-Jun-07 8:56 
Questionhow can ... Pin
B.A13-Jun-07 6:51
B.A13-Jun-07 6:51 
AnswerRe: how can ... Pin
Ed.Poore13-Jun-07 7:54
Ed.Poore13-Jun-07 7:54 
Questioncontroling status of a call made by a hanset using tapi 3 Pin
georgishelpmegodtoo13-Jun-07 6:10
georgishelpmegodtoo13-Jun-07 6:10 
QuestionNeed a DataGridView With Footer. Pin
hdv21213-Jun-07 5:39
hdv21213-Jun-07 5:39 
AnswerRe: Need a DataGridView With Footer. Pin
Not Active13-Jun-07 6:08
mentorNot Active13-Jun-07 6:08 
QuestionMoving a control in runtime with c#, without using c++ api Pin
sinosoidal13-Jun-07 4:15
sinosoidal13-Jun-07 4:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.