On 9/1/15, Corinna Vinschen <corinna-cyg...@cygwin.com> wrote: > On Sep 1 13:05, Michael Enright wrote: >> On Tue, Sep 1, 2015 at 12:48 PM, Roger Pack wrote: >> > It appears the problem lies with creating a file named "NUL" windows >> > utilities just don't know how to deal with it (you can recreate it by >> > creating a folder, then from cygwin bash $ touch NUL) then try and >> > remove the folder with windows explorer. >> >> The utilities "know" how to deal with it, given their design: >> http://blogs.msdn.com/b/oldnewthing/archive/2003/10/22/55388.aspx > > And then there's > > https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-dosdevices > > You can create and delete those files even in CMD, btw. You just have > to use the long pathname prefix "\\?\", e.g.: > > bash$ cmd /c 'echo foo > \\?\c:\cygwin64\home\corinna\nul' > bash$ ls -l nul > -rwxr-xr-x 1 corinna vinschen 6 Sep 1 22:30 nul > > delete with > > bash$ rm nul > > or > > bash$ cmd /c 'del \\?\c:\cygwin64\home\corinna\nul'
Yeah this works. Windows explorer is not as clever unfortunately, so lay users would find trouble here (my particular case is they install a local copy of cygwin which cross compile's something for them--no knowledge of cygwin required--but then suddenly they find they cannot remove folders through any easy means...) Cheers! -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple