#1  
Old 10th September 2008, 23:06
lsutiger2008 lsutiger2008 is offline
Junior Member
 
Join Date: Sep 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# program not acting right

I have a program that is supposed to zip a bunch of files and name them to a standard for each of our locations. The program was originally written in VS for windows and worked great.
I now rewrote it in Mono-develop for linux and of course I had to change the path information of zip.
Here's the relevant code
Code:
strArgs = DateTime.Now.AddMonths(-1).ToShortDateString();

				strArgs = strArgs.PadLeft(10,'0');

				strArgs = strArgs.Remove(2,4);

				file = file.PadLeft(2,'0');
				strArgs = " /home/brian/EOM" + file + strArgs + ".ZIP";

				path = " /home/brian/EOM/" + file + "/*.M" + file;

				strArgs = strArgs + path;
				//Console.Write(strArgs);

				myProcess.StartInfo.FileName = "zip";

				myProcess.StartInfo.Arguments = strArgs;

				myProcess.StartInfo.CreateNoWindow = true;

				try

				{

					myProcess.Start();

					myProcess.WaitForExit();

				

				}

				catch (SystemException caught)

				{

					Console.WriteLine(caught.ToString());

					continue;

				}
This produces a string of arguments as such:
Code:
/home/brian/EOM01082008.ZIP /home/brian/EOM/01/*.M01
but I get "zip warning: name not matched: /home/brian/EOM/01/*.M01" and nothing gets created. Yet when I do "zip /home/brian/EOM01082008.ZIP /home/brian/EOM/01/*.M01" in the CLI it works.

Any idea?
Thanx in advance!
Reply With Quote
Sponsored Links
  #2  
Old 2nd October 2008, 04:43
sbovisjb1 sbovisjb1 is offline
Senior Member
 
Join Date: Feb 2006
Posts: 175
Thanks: 0
Thanked 1 Time in 1 Post
Default

Does your distro understand what a .zip is?
Reply With Quote
  #3  
Old 3rd October 2008, 00:30
lsutiger2008 lsutiger2008 is offline
Junior Member
 
Join Date: Sep 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Yeppers

Quote:
Yet when I do "zip /home/brian/EOM01082008.ZIP /home/brian/EOM/01/*.M01" in the CLI it works.
Thanx for the reply!
Reply With Quote
  #4  
Old 3rd October 2008, 04:09
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Can you post the output of
Code:
ls -la /home/brian/EOM/01
?
As what user do you run the script?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 20th October 2008, 14:28
jacob martin jacob martin is offline
Junior Member
 
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am getting warnings when I build the install, and I've searched and it
appears that I can ignore them. I'm including them here, just in case that
is not true. I added Microsoft_VC80_ATL_x86.msm,
Microsoft_VC80_CRT_x86.msm, and Microsoft_VC80_MFC_x86.msm, and get warnings
about "Two or more objects have the same target location
('[payload_ul]\8.0.50727.762.policy')". I also have the ATL, CRT, and MFC
versions of policy_8_0_Microsoft_VC80_nnn_x86.msm which gives warnings about
"Two or more objects have the same target location
-----------------------------------------------------------------
Translation Self Certification Mortgage Quotes
Reply With Quote
  #6  
Old 6th November 2008, 10:35
akash011 akash011 is offline
Junior Member
 
Join Date: Nov 2008
Location: Dhaka
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default thanks for information

I added Microsoft_VC80_ATL_x86.msm,
Microsoft_VC80_CRT_x86.msm, and Microsoft_VC80_MFC_x86.msm, and get warnings


and thanks to your post.
__________________
Caribbean vacations Garden Bridges
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Monit & Munin SamTzu HOWTO-Related Questions 1 4th May 2008 18:03
Run program with own pid andipurwito Programming/Scripts 5 17th September 2007 09:06
Samba Acting as A PDC program install prob tommo HOWTO-Related Questions 2 14th April 2007 14:24
program to collect the packets full_adder Installation/Configuration 3 8th March 2007 21:42
Server Monitoring Program kisong Server Operation 1 18th November 2005 12:00


All times are GMT +2. The time now is 06:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.