Send to...

Nautilus Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

2
6.7
Description:

I made this simple script for easily send multiple files to a removable device or to any partition in the system.
Last changelog:

9 years ago

- Translated in English, German, Spanish, French, Polish, Bulgarian
- The Abort-Button in the Send-To script now works
- The script check now, the return value of the cp command and will then finish their work or pop-up a infobox, that something went wrong
- The script check now if destination is writable and, if not, it will print an info box
- Added a progress bar
- The script now allow to copy entire folders

cypherpunk

11 years ago

I doesn't copy folders and jpg files (gif, png, flv, I have successfully tried!) but the script is great anyways.. thanks a lot.

I hope it'll be completed any time soon, bye!

Report

sERieYx2

11 years ago

# Language Settings ---------------------------------------------------- #
destination='Pilih Destinasi'
title_destination='Hantar file ke:'

copy='Menyalin'
title_copy='Sila Tunggu...'

success='Semua file telah berjaya disalin'
title_success='Berjaya'

errors='Terdapat masalah'
title_errors='Masalah'

no_writable='Destinasi sama ada tidak wujud atau tidak dapat ditulis'
title_no_writable='Masalah'
# End of language settings ----------------------------------------------#

Report

Frants

11 years ago

Swedish translation.

# Language Settings ---------------------------------------------------- #
destination='Välj destination'
title_destination='Sänd filer till:'

copy='Kopierar'
title_copy='Var god vänta...'

success='Filerna kopierades'
title_success='Det lyckades'

errors='Något gick fel'
title_errors='Fel'

no_writable='Antingen existerar destinationen inte eller så är den inte skrivbar'
title_no_writable='Fel'
# End of language settings ----------------------------------------------#

Report

00061205

11 years ago

#!/bin/bash
# 发送到
##########################################################################
# Nautilus "发送到" 脚本 #
##########################################################################
# #
# Created by Mattia Galati (Adaron) #
# first improvement and translation by Christopher Bratusek (Chrispy) #
# #
##########################################################################
#--------------------中文翻译---------------------------------------------#
destination='请选择目标设备'
title_destination='发送文件到:'

copy='正在复制...'
title_copy='清等待...'

success='复制完毕'
title_success='成功'

errors='复制过程出现错误'
title_errors='错误'

no_writable='目标设备不存在或不可写'
title_no_writable='错误'
# End of language settings ----------------------------------------------#
##########################################################################

devices=`ls -m /media/`
vv=${devices//cdrom?, /}
vd=${vv//cdrom, /}
options=${vd//, / FALSE /media/}
destinazione=`zenity --list --title "$title_destination" --text "$destination" --radiolist --column " " --column "Device" FALSE /media/$options`

if [[ -w $destinazione ]]; then
cp $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS $destinazione | zenity --progress --pulsate --auto-close --title="$title_copy" --text="$copy"
if (( $? == 0 )); then
zenity --info --text="$success" --title "$title_success";
else zenity --info --text="$errors" --title "$title_errors";
fi
else zenity --info --text="$no_writable" --title "$title_no_writable";
fi

Report

begemot

11 years ago

Very usefull script! Thank You, Adaron, for the great addition to nautilus-scripts collection.

But here is some fixes from me: first of all (and the main one), it doesn't work with folders, it sends only files.
Please, add "-R" option direct after "cp" command in script to let users sending not just files, but whole folders too! (:

And "Cancel" button still returns error messege "Destination is either not existant or writable". It would be great, if You'll fix it in just closing window without messeges or something like that...

Finally please, add this Russian Translation from me.

#========Russian Translation======
destination='Выберите место назначения'
title_destination='Отправить файлы в:'

copy='Копирование'
title_copy='Пожалуйста, пожоджите...'

success='Файлы успешно скопированы'
title_success='Завершено'

errors='Произошёл сбой'
title_errors='Ошибка'

no_writable='Место назначения не существует или недостаточно прав для записи'
title_no_writable='Ошибка'
#========End of translation======

Thank You beforehand.

Report

Farliec

11 years ago

No french version available.

Report

Linux-World

11 years ago

Thank you man, this very useful!!

Report

risoto

11 years ago

The french version download the spanish version ^^

Report

nomentero

11 years ago

Please Adaron:is posible to implement in the next version,the posibility of send full folders.The script working nice in send files,but when i try to send a complete folder,the script give the ok done!screen but no folder in the selected device?.

Report

mwprado

11 years ago

# Language Settings ---------------------------------------------------- #
destination='Escolha um Destino'
title_destination='Enviar arquivos para:'

copy='Copiando'
title_copy='Por favor, aguarde...'

success='Arquivos copiados com sucesso'
title_success='Sucesso'

errors='Algum problema ocorreu'
title_errors='Erro'

no_writable='Destino não existe ou permissão para gravação negada'
title_no_writable='Erro'
# End of language settings ----------------------------------------------#

Report

antou

11 years ago

Hi, there's a mistake with one download link ; the french link points to the spanish script...
Nice script =)

Report

soupaloignon

11 years ago

Hello,

Thnks for your work, it's nice ;)

Sorry for my english, i'm grench ;)

It's possible to add other destinations ?

I have to try to add that :
devices=`ls -m /media/`
vv=${devices//cdrom?, /}
vd=${vv//cdrom, /}
options=${vd//, / FALSE /media/}
test=${/home/soupaloignon/Desktop}

But it's dont work. You have an idee ?

Report

C

Adaron

11 years ago

you can create a custom array like this:
my_custom_paths=(~/Desktop)
and then append ath the end of the line
destinazione=`zenity --list --title "$title_destination" --text "$destination" --radiolist --column " " --column "Device" FALSE /media/$options`
so it'll be like that:
destinazione=`zenity --list --title "$title_destination" --text "$destination" --radiolist --column " " --column "Device" FALSE /media/$options ${my_custom_paths[*]}`

maybe it will work.
Notice that in arrays, space are delimiters, so you have to try an alternative method if you want to use them.

Report

soupaloignon

11 years ago

thanks for your answer.

i write this at the begin of the script :
devices=`ls -m /media/`
vv=${devices//cdrom?, /}
vd=${vv//cdrom, /}
options=${vd//, / FALSE /media/}
my_custom_paths=(~/Desktop)
destinazione=`zenity --list --title "$title_destination" --text "$destination" --radiolist --column " " --column "Device" FALSE /media/$options ${my_custom_paths[*]}`

i have a new choice a the end of the list (no description, just a check box), when i selecyionne it i have a message:
Destination is either not existant or writable

an idee ?

thx ;)

Report

risoto

11 years ago

Send files to:='Envoyer les fichiers vers :'
Choose Destination='Selectionner le répertoire'
Files successfully copied='Fichiers copiés'
Success='Succès'
Something went wrong='Une erreur est survenue'
Error='Echec'

#Progress bar

Copying...='Copie...'
Please wait...='Veuillez patienter...'

Report

C

Adaron

11 years ago

thank you.
Next time, would be great if you send the part of the code with exactly variables and traduction.

Ps. Still miss a part of the traduction.

Report

risoto

11 years ago

Sorry Adaron, I begin with Linux. I'm used to translate a software for Windows : "Miranda IM" and I didn't know how display this in Linux

Report

xombox

11 years ago

Hi! Your script is cool, but could not you upgrade it to be able sending files to gajim and thunderbird? This would very helpful for me.

Thank you!

Report

pythonlong

11 years ago

change will be better

Report

pythonlong

11 years ago




Report

igancuhz

11 years ago

#!/bin/bash
# Send-To
##########################################################################
# Nautilus "Send to" Script #
##########################################################################
# #
# Created by Mattia Galati (Adaron) #
# first improvement and translation by Christopher Bratusek (Chrispy) #
# #
##########################################################################
# Language Settings ---------------------------------------------------- #
destination='Seleccione destino:'
title_destination='Enviar archivos a:'

copy='Copiando...'
title_copy='Por favor espere...'

success='Los archivos se han copiado correctamente.'
title_success='Correcto'

errors='Ha ocurrido un error.'
title_errors='Error'

no_writable='El destino no existe o no se puede escribir en el.'
title_no_writable='Error'
# End of language settings ----------------------------------------------#
##########################################################################

devices=`ls -m /media/`
vv=${devices//cdrom?, /}
vd=${vv//cdrom, /}
options=${vd//, / FALSE /media/}
destinazione=`zenity --list --title "$title_destination" --text "$destination" --radiolist --column " " --column "Device" FALSE /media/$options`

if [[ -w $destinazione ]]; then
cp $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS $destinazione | zenity --progress --pulsate --auto-close --title="$title_copy" --text="$copy"
if (( $? == 0 )); then
zenity --info --text="$success" --title "$title_success";
else zenity --info --text="$errors" --title "$title_errors";
fi
else zenity --info --text="$no_writable" --title "$title_no_writable";
fi

Report

igancuhz

11 years ago

I forgot this:

destinazione=`zenity --list --title "$title_destination" --text "$destination" --radiolist --column " " --column "Dispositivos" FALSE /media/$options`

Report

C

Adaron

11 years ago

I've received some nice updates to the code from Chrispy, so please, if you would like to add a new translation, add a post with only language strings updated. Thanks to all!

Report

risoto

11 years ago

#!/bin/bash
# ----------------------------------------
# Nautilus "Envoyer vers" Script
# ----------------------------------------
#
# Created by Mattia Galati (Adaron)
# first improvement and translation by Christopher Bratusek (Chrispy)
#

devices=`ls -m /media/`
vv=${devices//cdrom?, /}
vd=${vv//cdrom, /}
options=${vd//, / FALSE /media/}
destinazione=`zenity --list --title "Envoyer les fichiers vers:" --text "Selectionner le répertoire" --radiolist --column " " --column "Device" FALSE /media/$options`

if [[ $destinazione == "" ]]; then
exit
fi

cp $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS $destinazione

(cp $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS $destination)|zenity --progress --pulsate --auto-close --title=Copie... --text="Veuillez patienter..."

if (( $? == 0 )); then
zenity --info --text="Fichiers copiés" --title "Succès";
else zenity --info --text="Une erreur est survenue" --title "Echec";
fi

Report

igancuhz

11 years ago

If you are copying huge files, you can add a progress bar.

(cp $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS $destination)|zenity --progress --pulsate --auto-close --title=Copying... --text="Please wait..."

Report

9 years ago

- Translated in English, German, Spanish, French, Polish, Bulgarian
- The Abort-Button in the Send-To script now works
- The script check now, the return value of the cp command and will then finish their work or pop-up a infobox, that something went wrong
- The script check now if destination is writable and, if not, it will print an info box
- Added a progress bar
- The script now allow to copy entire folders

12345678910
1
product-maker I4C Feb 19 2013 3 bad
product-maker Count:85 Rating: 6.75
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
updated Jul 15 2009
added Oct 09 2007
downloads today
0
page views today 4
System Tags addon