From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <760A8970-E5E3-4313-9873-A1AA17787C55@lsub.org> From: Francisco J Ballesteros To: "9fans@9fans.net" <9fans@9fans.net> Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (iPhone Mail 5H11) Date: Tue, 16 Jun 2009 20:34:29 +0200 Subject: Re: [9fans] simple question: multiple rename Topicbox-Message-UUID: 0bea19ae-ead5-11e9-9d60-3106f5b1d025 We always use trfs in the 9fs script. It's so convenient that we forgot it's there. I think it's in contrib. Otherwise let me know. El 16/06/2009, a las 17:58, john@csplan9.rit.edu escribi=C3=B3: >> On Tue, 16 Jun 2009 08:00:44 -0400 >> erik quanstrom wrote: >> >>>> note that this won't work if the filenames contain white space. >>>> >>>> (i still regret the fact that white space became allowable in =20 >>>> file names) >>> >>> using ws in filenames is a fossil-only problem; >>> kfs, cwfs and ken's fs won't allow it. >>> >>> fortunately, fossil is easy to fix >>> >>> /n/dump/2009/0616/sys/src/cmd/fossil/9p.c:102,108 - 9p.c:102,108 >>> } >>> >>> for(p =3D name; *p !=3D '\0'; p++){ >>> - if((*p & 0xFF) < 040){ >>> + if((*p & 0xFF) <=3D 040){ >>> vtSetError("bad character in file name"); >>> return 0; >>> } >>> >>> - erik >>> >> >> So what happens when you drawterm from a un*x box or access a VFAT =20= >> partition? Perhaps 9fat could dynamically translate spaces in =20 >> filenames to some character illegal in Windows file names and not =20 >> special to rc, if there is such a character. I don't recall what =20 >> characters are illegal in Windows filenames but for the purposes of =20= >> example assume ~ is illegal: > > I believe it was Nemo et al. who wrote trfs, which does essentially > what you want--it stands between you and your badly-named files, > presenting spaces as underscores or something to that effect. > > John > > > [/mail/box/nemo/msgs/200906/42195]