View Full Version : Moving files
Weaseal
07-14-2008, 07:52 AM
I have a bunch of photos in the naming scheme 100_0001.jpg, 1000_002.jpg, etc. how would i do something like move 1000_432.jpg through 100_789.jpg to a different folder without specifying each one individually?
TerryP
07-14-2008, 08:19 AM
You can probably make use of the shells globing features to only operate on the desired range.
Me I would just try to use Perl to loop over the range and move() them, out of instinct.
BSDfan666
07-14-2008, 08:30 AM
Perhaps:
mv $(ls 1000_*.jpg | sed -n -e '/432/,/789/p') /path/to/destination/folder
It should work, untested though.
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.