LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2012, 05:07 AM   #1
Springs
Member
 
Registered: Apr 2008
Posts: 73

Rep: Reputation: 0
creating a script that will move completed downloads into other folders?


Hi all,

I'm trying to write a script that will move completed downloads from my main folder into 3 other folders where they are processed further by other programs.

I can create a file with names of the completed files but from here I'm stuck.

So depending if its a movie or a tv show it needs to go into one folder or another. To filter them out I can provide another list with the tv show names on or if they can be filtered out using the series / episode ie S**E** then any other video format to be moved into another folder.

Anything else that's left over gets put into a general folder.

Some files are in folders which have spaces in and other symbols and others are just the file itself.

If someone can offer some assistance that would be good.


So far I run a command and out put that into a file. I then use awk to print the text in certain columns into another file which gives me my list of files / folders to be moved.
 
Old 12-01-2012, 06:46 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Springs View Post
I'm trying to write a script (..).
I can create a file with names of the completed files but from here I'm stuck. (..)
So far I run a command and out put that into a file. I then use awk to print the text in certain columns into another file which gives me my list of files / folders to be moved.
Post what code you've got already or post at least post all the commands that shows you processing one item.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH script to move files/folders to either the .Trash file or to another direcotry bettsy583 Linux - Newbie 13 12-03-2010 03:41 AM
Write a script to move specific files in various folders to one folder linuxisthedevil Linux - General 13 11-18-2010 06:29 AM
rtorrent - move completed files imagineaxion Ubuntu 3 03-11-2008 04:17 AM
rtorrent: Cannot move completed files... ackzsel Linux - Software 1 12-14-2007 12:54 PM
Firefox popups for completed downloads linuxhippy Linux - Networking 1 10-10-2005 07:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration