vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Joe wrote: > I figured this out using date and cut but don;t know how to omit > non-files (directories) in my "mv" loop find . -type f if you don't want recursive directory searches, look into the -prune option of find |
| ||||
| I'd be interested in seeing your how you solved it with the date and cut command? What date format were you looking for? We all know there are a thousand ways to do the same thing without there being a definite right way, but here is what I came up with (I did it from the command line, but you could easily make a script out of it): $ cd /path/to/source/files $ d=`date +%Y%m%d` $ for i in `find . -type f` >do >mv $i /file/to/new/files/$i.$d >done $ T. |