How to Excluding Extensions Creating RAR & Uploading it

for media files in directory i want change every special char in name to "_" , create screenshots, get media information, then cat that info in 1 file, after that i want split (only) media files (not *.jpg,*.txt, etc.) with rar (including some file with info in each archive, and give each archive comment), than upload to myftp.com all archive parts and all *.jpg(export url in file), after all done delete archive. Please help me how to do that.. im newbie in unix.

Yes, the do cannot not be right after the for var in list. The mv looks OK. Why not do that first. Might check that there is no target else echo Collision: orig target

DGPickett,
Thanks for take a part in this thread & help me to find solution on this question!

for file in *
do
mv "$file" $(echo "$file" | sed 's/[^A-Za-z0-9.]//g')
done 
rm -r ./scrsht
mkdir ./scrsht
ls *.jpg *.log *.txt | xargs rm -f
for file in *
do
/root/scr/mtn -i -t -h 150 -w 700 -c 2 -r 3 -k ffffff -B 100 -E 80 -g 2 -N_.txt "$file"
done
ls *.txt | xargs cat > techinfo.log
ls *.txt | xargs rm -f
ls *.jpg | xargs mv ./scrsht
mv techinfo.log ./scrsht

But i dont know how to move to the relative dir all .jpg files.. trying "ls *.jpg | xargs mv ./scrsht" and after listening dir for jpg files mv think that the name of 2nd file is a path..

Let the shell do the walking?

mv *.jpg scrsht

Thanks! it works)

---------- Post updated at 09:45 PM ---------- Previous update was at 06:22 PM ----------

Hmm.. may somebody knows how to:
upload to ftp by extension and get links into file, then cat that file with links into one like this :
(
file 1
"somecode"
"somediffercode"

file 2
"another code
in two lines"
"just code
in two line"
) ===> cat they into one file like that
file 3
somecode
another big code
in two lines

"somediffercode"
"just code
in two line"

Any solutions?
Thanks in advance!!

If you extract two files from the archive to stdout, they are concatenated. Well, I am awash in lack of context! :smiley:

1 Like

))) Hmm i mean i have 2 files for exmpl. links & descriptions:

in links file some strings like that:
mysite.com/file.rar
mysite.com/file2.rar 
.. etc,
in description:
File: file.rar
Size: 76.56 MiB
File: file2.rar
Size: 72.56 MiB
.. etc

and i need to get output looks like that:

File: file.rar
Size: 76.56 MiB
mysite.com/file.rar

File: file2.rar
Size: 72.56 MiB
mysite.com/file2.rar 

..etc

.. So if you can please help me to do this))

In rar, option p, for pipe!
Ubuntu Manpage: rar - archive files with compression

1 Like