Move a file???

Help each other out

Move a file???

Postby Marbles_00 on Wed Sep 30, 2009 11:24 pm

Okay, I'm having a brain problem now. What I'd like to do is have the option of playing or moving recorded shows to my server. I can setup an event to play fine...but I can't think of the life of me how to have a button option to move the file from a computer to my server. Anyone have any ideas?

Basically I'm going to have a category of recorded shows. When you select a show, an overlay will pop up as to whether you'd like to watch the show on the local machine, or move the show to the server...so any of the machines in the house can watch it.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Move a file???

Postby m_ski on Thu Oct 01, 2009 12:09 pm

run a batch file with something like this is it (you'll have to check the exact terms);

move %1 %2 (Type 'help move' at the command prompt to give you all options for this command)

Then the command in xlobby would be an execute file command to the .bat file above with the arguments; <file to move>, <destination folder>
m_ski
 
Posts: 204
Joined: Wed Dec 08, 2004 7:57 am
Location: Kent, United Kingdom

Re: Move a file???

Postby Marbles_00 on Thu Oct 01, 2009 2:16 pm

Thanks m_ski,

So to clarify the argument, I would want to take the parameter field of the tv show (since that would have the current file location and file name, and place it on a network drive, so for example I have a file called lost.mpg sitting in a directory called recordedtv (c:\\recordedtv\lost.mpg would be my parameter), and I want to move it to a directory called recordedtv on my UnRAID server, which goes by the ident \\Tower\, so my argument would be:
Code: Select all
%parameter%,\\tower\recordedtv\


Hope it's that simple.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Move a file???

Postby m_ski on Fri Oct 02, 2009 12:15 pm

I am not sure if the move command is going to work with a server referred to like that - it may need a drive letter - try it, it might work.
You should probably put quotes around each argument as well, in case there are any spaces in the filename. You also do not need to use a comma (my mistake).

Code: Select all
"%parameter%" "\\tower\recordedtv\"


at the start of the batch file you can put
Code: Select all
echo %1
echo %2


Which will show you exactly what names the batch file has received
m_ski
 
Posts: 204
Joined: Wed Dec 08, 2004 7:57 am
Location: Kent, United Kingdom

Re: Move a file???

Postby Marbles_00 on Fri Oct 02, 2009 4:00 pm

Excellent. Thanks for the help m_ski. Now I have something to try out...instead of banging my head off the screen.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Move a file???

Postby scottw on Fri Oct 02, 2009 5:11 pm

You should be able to have a batch file that looks something like
Code: Select all
move %1 %2

Then in XL use the execute event and point it to the batch file and in the arguments section have "%parameter%" "\\tower\recordedtv\"
Just like m_ski says...I am doing something similar. Funny how long batch files have been around and I did not know about the %1, %2 thing before, cool stuff :D
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: Move a file???

Postby Marbles_00 on Tue Oct 06, 2009 2:20 pm

gees. This ain't work'n for me.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Move a file???

Postby C-moi on Tue Oct 06, 2009 4:55 pm

try this
"%name of database>parameter%" "\\tower\recordedtv\"
example
"%movies>parameter%" "\\tower\recordedtv\"
C-moi
 
Posts: 164
Joined: Fri Apr 23, 2004 6:58 am
Location: France

Re: Move a file???

Postby Marbles_00 on Tue Oct 06, 2009 8:01 pm

try this
"%name of database>parameter%" "\\tower\recordedtv\"
example
"%movies>parameter%" "\\tower\recordedtv\"


BINGO!!! That seemed to work moving a file locally. Tonight I will try across the network. Thanks a bunch c-moi, m_ski, and scottw for helping me out.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada