LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-16-2010, 12:35 AM   #1
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Rep: Reputation: 30
Is there a daemon to auto rename a file?


Hello, I need a daemon that can automatically rename a file for me.

I have a program I use that downloads a file a couple times a day, but it does not name it how I want it named. So I am looking for something that i can run as a daemon that will rename the downloaded file as soon as it is downloaded to my specified directory and rename it according to my needs.

Thanks for any help provided
 
Old 09-16-2010, 12:49 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
I think you may be approaching this in the wrong way. Can you not make the existing program simply save the file with a different name? What is this program?

Evo2.
 
Old 09-16-2010, 06:33 AM   #3
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

you can use incrond to monitor your download directory
http://linux.die.net/man/8/incrond

Configure it to monitor your download directory for event
IN_CLOSE_WRITE

and then have the daemon rename it or have it call a script which will create a name as you have in mind.
 
1 members found this post helpful.
Old 09-16-2010, 10:58 AM   #4
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
Incron worked out perfectly.

Thanks for the quick help.

I would have modified the program to save the file correctly in the first place, but we do not have access to do that.
 
  


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
starting xscreensaver daemon auto Kanaflloric Linux - General 3 01-24-2011 05:15 PM
configure daemon not to auto-start kpachopoulos Debian 4 08-19-2006 12:18 PM
Problems auto loading hardware with the HAL daemon. spicyed Linux - Hardware 1 03-07-2006 01:05 PM
auto file rename based on time wx_jason Linux - Newbie 10 07-10-2003 11:14 AM
auto rename contents of a DIR bkeating Linux - General 1 11-05-2002 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:20 AM.

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