karabaja
18th August 2006, 22:34
I need some files to be copied to a different folder. I have to setup a script which downloads a file called file.zip, but the problem is that this file is extracted every time to a folder with different name. I think this file is updated weekly and and then folder in which files are extracted is for example
/file/file01082006.
Now is there a way for me to copy all files in that folder to another location. It contains like 50 txt files. I only need to copy txt files, not the folder itself.
I'd like to setup a cron which would copy these files. But I am not sure how since I can't specify a path which would change every week, even though the name of txt files is always the same.
Another thing I could use a help with is, is there some command or more of them I could use to insert two words at the very beginning and the end of those files. Like to insert "start" and "end" in each file.
One last thing is how could I rename all .txt files in a folder to .html ?
Thank you in advance, I hope my question is understandable. I am a beginner and English is not my native language.
/file/file01082006.
Now is there a way for me to copy all files in that folder to another location. It contains like 50 txt files. I only need to copy txt files, not the folder itself.
I'd like to setup a cron which would copy these files. But I am not sure how since I can't specify a path which would change every week, even though the name of txt files is always the same.
Another thing I could use a help with is, is there some command or more of them I could use to insert two words at the very beginning and the end of those files. Like to insert "start" and "end" in each file.
One last thing is how could I rename all .txt files in a folder to .html ?
Thank you in advance, I hope my question is understandable. I am a beginner and English is not my native language.