Copy Script (need help)

Suggest, post, or discuss plugins for Deluge
crazycaveman
Member
Member
Posts: 28
Joined: Mon Apr 30, 2012 3:08 am

Re: Copy Script (need help)

Post by crazycaveman »

It's interesting that it copied an empty directoy; it's set to not do that. In any case, I haven't been able to get it copy an empty directory. Would you mind generating a log file for me with the following code instead? All I've done is remove the first line in the script and add the last.

Code: Select all

set dest_dir=E:\Leeching\Done\%~2
set srce_dir=%~3\%~2
if not exist "%dest_dir%" mkdir "%dest_dir%"
xcopy /S "%srce_dir%" "%dest_dir%"
exit /B 5
To generate a log file, right click on the Deluge shortcut and select Properties. Change the target from "C:\Program Files (x86)\Deluge\deluge.exe" to "C:\Program Files (x86)\Deluge\deluge.exe" -l Q:\Vodkaholic\Software\deluge.log -L info (the quote placement are important). Hopefully, we'll get this resolved!
User avatar
vodkaholic27
Member
Member
Posts: 25
Joined: Thu Apr 12, 2012 1:48 pm
Contact:

Re: Copy Script (need help)

Post by vodkaholic27 »

It's working now mate, but there was nothing in the logs "yay" only last question. Is there a way to stop the "black cmd Box" poping up everytime a torrent finishes?

Cheers
User avatar
vodkaholic27
Member
Member
Posts: 25
Joined: Thu Apr 12, 2012 1:48 pm
Contact:

Re: Copy Script (need help)

Post by vodkaholic27 »

Ah its missed one again,

Everytime I add the "" to this is auto changes it back to this
D:\Deluge\deluge.exe -l Q:\Vodkaholic\Software\deluge.log -L

"D:\Deluge\deluge.exe" -l Q:\Vodkaholic\Software\deluge.log -L
does not add
crazycaveman
Member
Member
Posts: 28
Joined: Mon Apr 30, 2012 3:08 am

Re: Copy Script (need help)

Post by crazycaveman »

Unfortunately, the only way (that I know of) to prevent the black command box from popping up is by running deluged as a service and running the client separately. Also, there should be 'info' after the -L (got put on the next line in my previous comment), but if it's working, you don't need to worry about it. I must say, it would be nice to have a solution for preventing the command box popup, so I'll do some more looking around about that. Glad it's working, though!
User avatar
vodkaholic27
Member
Member
Posts: 25
Joined: Thu Apr 12, 2012 1:48 pm
Contact:

Re: Copy Script (need help)

Post by vodkaholic27 »

Ah its not working mate (its still missing the odd random one "ie copying a empty folder". I have abit of an odd question for you here :P I have deluge on my debian server I was planing on using it as a seedbox but could I use this script on that to copy the finished torrents to my home pc

example

Leeching (Server)
Leeching Done (Server)
Downloads Done (Home PC)

The reason I ask is my net speed it 100mb down and 10mb up the server is 200mb down and 200mb up

Cheers and thanks for helping :)
crazycaveman
Member
Member
Posts: 28
Joined: Mon Apr 30, 2012 3:08 am

Re: Copy Script (need help)

Post by crazycaveman »

It is possible to copy from the Linux box to your home Windows box. You will have to install a file service of some sort on you Windows machine, however, either FTP, SFTP, SCP, RSYNC, etc. Depending on how secure you want to be and how much time you want to take to set it all up, we can figure something that will work. Me, personally, I have ssh/scp setup through cygwin.
User avatar
vodkaholic27
Member
Member
Posts: 25
Joined: Thu Apr 12, 2012 1:48 pm
Contact:

Re: Copy Script (need help)

Post by vodkaholic27 »

crazycaveman wrote:It is possible to copy from the Linux box to your home Windows box. You will have to install a file service of some sort on you Windows machine, however, either FTP, SFTP, SCP, RSYNC, etc. Depending on how secure you want to be and how much time you want to take to set it all up, we can figure something that will work. Me, personally, I have ssh/scp setup through cygwin.
Does it do it all auto for you?
Cheers
crazycaveman
Member
Member
Posts: 28
Joined: Mon Apr 30, 2012 3:08 am

Re: Copy Script (need help)

Post by crazycaveman »

To be honest, I just got my server set up, but the script I just created does work for me (I only have it copy certain files based on the files' location). Here's a basic copy script using scp:

Code: Select all

#!/bin/bash
dest_host='username@example.org'
dest_dir='/cygdrive/e/Leeching/Done'

srce_file=$3/$2
dest_dir=$(echo ${dest_dir} | sed 's/\([^\]\) /\1\\ /g')  # Add backslashes for scp target

scp -r "${srce_file}" ${dest_host}:"${dest_dir}" &
edit: Wow, made a few typos, but those have been corrected...
Last edited by crazycaveman on Fri May 11, 2012 4:04 pm, edited 3 times in total.
User avatar
vodkaholic27
Member
Member
Posts: 25
Joined: Thu Apr 12, 2012 1:48 pm
Contact:

Re: Copy Script (need help)

Post by vodkaholic27 »

crazycaveman wrote:To be honest, I just got my server set up, but the script I just created does work for me (I only have it copy certain files based on the files' location). Here's a basic copy script using scp:

Code: Select all

#!/bin/bash
dest_host='username@example.org'
dest_dir='/cygdrive/e/Leeching/Done'

srce_file=$3/$2
dest_dir=$(echo ${dest_dir} | sed 's/\([^\]\) /\1\\ /g')  # Add backslashes for scp target

scp -r ${srce_dir} ${dest_host}:${dest_dir}
When you say scp it that some windows software you use? am very sorry am really new to all this.

Mike
crazycaveman
Member
Member
Posts: 28
Joined: Mon Apr 30, 2012 3:08 am

Re: Copy Script (need help)

Post by crazycaveman »

It's all good. SCP stands for "Secure copy" and is usually found on *nix based computers, installed with ssh. In my case, I installed the cygwin suite, which allows you to install Linux like programs on Windows, and set up the ssh service through that. But, like I said earlier, this is just one of several ways to copy files from a Linux box to Windows.
Post Reply