Add text to the beginning of file names
I tried doing a search on the forums to do what I want, but didn't have much luck.
I have a directory of files, and I want to prepend the same text string to each file. example: file1 file2 file3 renamed to: this.file1 this.file2 this.file3 Thanks in advance for any help. |
Code:
for looper in `ls <directory>` |
Thanks. That was exactly what I needed.
|
i was already on here and needed the answer to this right now, and there it was!
thanks! |
Quote:
Code:
for looper in `ls <directory>` Besides that, if you are using bash there's no need to use ls (and it can save you some pain sometimes to avoid it): Code:
for looper in "/directory/"* |
Quote:
eg usage Code:
# ls -1 |
All times are GMT -5. The time now is 07:46 AM. |