Re: Filenames with ToString
- To: mathgroup at smc.vnet.net
- Subject: [mg99965] Re: Filenames with ToString
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Wed, 20 May 2009 05:01:36 -0400 (EDT)
- References: <guu2ef$67d$1@smc.vnet.net>
Alain Mazure wrote: > Hi again > > I have several files with extension .jpg of the type > > "C1822_8_025_1.jpg", "C1822_8_025_2.jpg" > "C1943_11_025_1.jpg", "C1943_11_025_2.jpg" ..... > > I know the first part of the name which was given by : "" ~~ > ToString[NAME2] with NAME2: C1822, C1943 ... > > How to use FileNames in order to have, for a given NAME2 all the *.jpg > files in order to import them ? > > The command: FileNames["" ~~ ToString[NAME2]*".jpg"] does not work > name = "C1822" FileNames[name <> "*.jpg"]