X-Spam-Check-By: sourceware.org Message-ID: <20060416011148.24665.qmail@web38104.mail.mud.yahoo.com> Date: Sat, 15 Apr 2006 18:11:48 -0700 (PDT) From: The One Subject: Re: Not sure what the problem is... To: cygwin AT cygwin DOT com In-Reply-To: <44411B9B.BC626D54@dessent.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, Well, I'm runing the program on computer that does not have cygwin installed. I just put a copy of the cygwin1.dll in the windows path. My typo, I do have it like this system("ls -la c:\\mydir > c:\\mydir\\tmp\\lookup.txt") as I mentioned in my post, the same program runs in other computers running windows xp, just not running on this particular machine. I couldn't get it to recognize /cygdrive/c/mydir or /c/mydir since cygwin is not installed on the computer. I tried adding the mount v2 info in the registry but that didn't work. I would appreciate very much if you can help me to get it to recognize posix path. --- Brian Dessent wrote: > The One wrote: > > > I have this C program running on windows xp and > it's > > calling system("ls -la c:\mydir > > > c:\mydir\tmp\lookup.txt") to list "mydir" and pipe > the > > result to a file "lookup.txt" the subdirectory > "tmp". > > Well for one thing, in C if you want a backslash in > a string constant > you need to use "\\". "\t" is the tab character, > "\n" is a newline, and > so on. Consult a book on C for more information, > this is offtopic for > the list. > > But if you're using Cygwin you should not be passing > around win32 paths > like that. Cygwin tools expect Posix paths, and > that they happen to > work with win32 paths is just coincidental and may > break at any time. > In fact there are many Cygwin utilities that will > not work properly if > you do this, you can see the results of these > mistakes scattered > throughout the list archives. > > You should use "c:/mydir", or preferably, > "/cygdrive/c/mydir". Or, if > you've changed your cygdrive prefix to "/" you could > just use > "/c/mydir". See also "man cygpath". > > Brian > > -- > Unsubscribe info: > http://cygwin.com/ml/#unsubscribe-simple > Problem reports: > http://cygwin.com/problems.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/