X-Spam-Check-By: sourceware.org
From: wu_xiaomin@emc.com
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; 	charset="iso-8859-1"
Subject: Could not touch file when specify full path in Cygwin in .bat file
Date: Mon, 12 Jun 2006 15:22:05 -0400
Message-ID: <38EA73F8F9C1844FA2ECE82DEE237F3C224E34@CORPUSMX40B.corp.emc.com>
To: <cygwin@cygwin.com>
Cc: <Balasundaram_Priya@emc.com>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k5CJMhF4008303

Hi, Cygwin support group,

I have problem to touch a file when specify the full path. Here are some examples. MKS works fine


-- Filename with special characters
D:\>touch D:\usr\meta\boxster\UNITw2kMixednew\boxster_UNITw2kMixednew_0205\Tree\!@#$%&()_+.!@#$%&()_+
) was unexpected at this time.

-- With the quote on filename
D:\>touch D:\usr\meta\boxster\UNITw2kMixednew\boxster_UNITw2kMixednew_0205\Tree\"!@#$%&()_+.!@#$%&()_+"

touch: cannot touch `D:\\usr\\meta\\boxster\\UNITw2kMixednew\\boxster_UNITw2kMixednew_0205\\Tree\\!@#$%&()_+.!@#$%&()_+': No such file or directory

-- We can touch a file with the double quota in DOS cmd window.
D:\>touch  "D:\usr\meta\boxster\boxster_UNITw2kMixednew\boxster_UNITw2kMixednew_0205\Tree\!@#$%()_+.!@#$%&()_+"

D:\usr\meta\boxster\boxster_UNITw2kMixednew\boxster_UNITw2kMixednew_0205\Tree>ls

!@#$%()_+.!@#$%&()_+



--- If we put this touch command in windows batch file -- (clone.bat) file, it won't work.

SET TEST_SERVER=D:\usr\meta\boxster\UNITw2kMixednew\boxster_UNITw2kMixednew_0205\Tree
touch "%TEST_SERVER%\!@#$%%^&()_+.!@#$%%^&()_+"                     <== (we try touch without quote, same result)

--- run .bat file
D:\usr\meta\boxster\boxster_UNITw2kMixednew\boxster_UNITw2kMixednew_0205>cmd /c clone.bat
touch: cannot touch `D:\\usr\\meta\\boxster\\UNITw2kMixednew\\boxster_UNITw2kMixednew_0205\\Tree\\!@#$%^&()_+.!@#$%^&()_+': No such file or directory


Do you know why is that and how do we make it work in .bat file?

Thanks a lot for your help!

Xiaomin

EMC˛ 
Where Information Lives
Xiaomin Wu
Phone#: 508-305-8783
Ext: 48783
E-mail: wu_xiaomin@emc.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/


