mv -fv "$1/*" $HOME/Desktop/
try this
simple script to move files after processing
Re: simple script to move files after processing
THis doesn't work eitherMar2zz wrote: mv -fv "$1/*" $HOME/Desktop/
try this
Re: simple script to move files after processing
use cp instead of mv and delete sourcefiles after succesfull copy.
Re: simple script to move files after processing
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
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
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
-
- Newbie
- Posts: 2
- Joined: November 10th, 2013, 3:38 pm
Re: simple script to move files after processing
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"
#!/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"
-
- Newbie
- Posts: 2
- Joined: November 10th, 2013, 3:38 pm
Re: simple script to move files after processing
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"
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
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.,
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
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
Hi Guys,
my first time here
so, whats the final script like ?
Please could use the help.
Im on OSX.
Thank YOU
my first time here
so, whats the final script like ?
Please could use the help.
Im on OSX.
Thank YOU