You can also try it with a simple test: * for i in C:/Users/tappenbeck/Desktop/Project/* do [ -d "$i" ] && echo "$i" is directory done*
Notice that because it is in a shell script and is broken into separate lines already, the semi-colons ";" have been removed. You only need semicolons when placing it in one line, like copy and pasting into a terminal instead of running from a script. Take your pick =) Donovan On Wed, Jun 20, 2012 at 12:51 PM, <pcr...@pcreso.com> wrote: > Hi Jan > > > for i in C:/Users/tappenbeck/Desktop/Project/*; > > change to : > > for l in `ls C:/Users/tappenbeck/Desktop/Project/` ; > > > enclosing a comand in back quotes will return the result of the command, & > you want to return a list iof the contents of the folder, not the string > which is the folder name. > > > --- On *Thu, 6/21/12, Jan Tappenbeck <o...@tappenbeck.net>* wrote: > > > From: Jan Tappenbeck <o...@tappenbeck.net> > Subject: [Qgis-user] help to list files by bourne-shell > To: "qgis-mailingliste" <qgis-user@lists.osgeo.org> > Date: Thursday, June 21, 2012, 2:36 AM > > > hi ! > > i want to create a script for use in msys - but i am not a linux-user. i > try to create this by a template: > > #!/bin/sh > # Einfaches Beispiel > > for i in C:/Users/tappenbeck/Desktop/Project/*; > do > if [ -d "$i" ]; > then > echo $i is directory; > fi; > done > > but there will no files list - can anyone help me ? > > reagards Jan :-) > > _______________________________________________ > Qgis-user mailing list > Qgis-user@lists.osgeo.org <http://mc/compose?to=Qgis-user@lists.osgeo.org> > http://lists.osgeo.org/mailman/listinfo/qgis-user > > > _______________________________________________ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user > >
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user