Page 3 of 3
Re: simple script to move files after processing
Posted: April 11th, 2011, 11:00 am
by Mar2zz
mv -fv "$1/*" $HOME/Desktop/
try this
Re: simple script to move files after processing
Posted: May 4th, 2011, 5:04 pm
by Crush
Mar2zz wrote:
mv -fv "$1/*" $HOME/Desktop/
try this
THis doesn't work either
Re: simple script to move files after processing
Posted: May 23rd, 2011, 12:16 am
by Mar2zz
use cp instead of mv and delete sourcefiles after succesfull copy.
Re: simple script to move files after processing
Posted: May 23rd, 2011, 12:22 am
by Crush
Yeah. I forgot to post in this thread. I got this working. I love it!
Code: Select all
#!/bin/bash
DIR_DEST=${HOME}/Movies/
DIR_TRASH=${HOME}/.Trash/
mv -f "$1"/* $DIR_DEST && mv -fv "$1" $DIR_TRASH
Re: simple script to move files after processing
Posted: January 12th, 2013, 5:56 pm
by Rumik
Hi all, can you help me?
I'm running sab on max OS X and am in need of a script to copy files sab downloads to a specific folder into another folder. no moving, no deleting, just copying. I had a friend write a python script but it doesn't seem to work, so having looked here a bit it seems the .sh scripts are simpler. So anyway, can anyone help me out?
Thanks
Re: simple script to move files after processing
Posted: November 10th, 2013, 3:46 pm
by ronaldhovens
This one works for me on MAC OSX (modified from Mar2zz ยป februari 10th, 2011, 7:24 pm). His script could not handle directories with spaces in them but mine does ;-)
#!/bin/bash
for folders in "$1"/* ; do
newpath=$(echo $folders | sed "s#/Users/Chris/Downloads/#/Network Drive/#g")
mkdir -p "$newpath"
mv -f "$folders"/* "$newpath"
done
rm -Rf "$1"
Re: simple script to move files after processing
Posted: November 10th, 2013, 5:42 pm
by ronaldhovens
Excuse me... My last script had an error, it created subduers instead of files.
Here's the correct script:
#!/bin/bash
for folders in "$1" ; do
newpath=$(echo $folders | sed "s#/Users/Chris/Downloads/#/Network Drive/#g")
mkdir -p "$newpath"
mv -f "$folders"/* "$newpath"
done
rm -Rf "$1"
Re: simple script to move files after processing
Posted: December 20th, 2013, 8:10 pm
by Ilium
Sorry for piggy-back riding on this thread, but I have exactly the same noob problem.
All I want to do is move a movie folder after it has been unpacked and the folder has been renamed back from UNPACK_movie to <movie>.
I have an EventGhost automation set up that will run The Renamer and try renaming the folder and moving it to another folder,
where Ember Media Manager will scrape it. When SABNZBd unpacks the movie into the automation folder, the initial folder name
is "UNPACK_movie_title" and this will trigger my automation, even though the file is still in use.
That's why I thought it would be better to wait until the movie is extracted and then move the entire folder to M:\movies afterwards.
Has that already been discussed here? Sorry, I am really an idiot when it comes to scripts, but if you need car repair, I'm your man lol.,
Re: simple script to move files after processing
Posted: January 14th, 2014, 1:23 pm
by bmupton
I think my last post in this thread:
http://forums.sabnzbd.org/viewtopic.php?f=9&t=16457 may help you. It's a Windows batch script, but the theory behind it should get you going.
Re: simple script to move files after processing
Posted: June 10th, 2015, 2:24 pm
by groovio
Hi Guys,
my first time here
so, whats the final script like ?
Please could use the help.
Im on OSX.
Thank YOU