Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old November 10th, 2005, 03:27 PM
Bud Man Bud Man is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Carmel, NY USA
Posts: 29 Bud Man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 45 m 4 sec
Reputation Power: 0
Send a message via ICQ to Bud Man Send a message via AIM to Bud Man Send a message via MSN to Bud Man Send a message via Yahoo to Bud Man
Question Sorting Directory and Moving File

To put it mildly, my script writing abilities suck. I have therefore decided to seek the assistance of someone who is willing to write a script for me.

First of all, I am running FreeBSD 5.4. Besides the base shell, I also have Bash 3.00.16(1), php 5.0.5 (cli), ruby 1.8.2 and Perl 5.8.7 installed.

I am presently running DADA Mail to deliver a newsletter nightly. In order to send a different message nightly, I have to enter the file name for each file that is to be sent. I have named all of the files to be sent according to the date; i.e., 11-01-05.txt, 11-02-05.txt, etc. All of the files are kept in the same directory.

What I want is a simple script that would run from CRON once daily. The script would sort the directory and then move the first file to a file named: “2Bsent.txt” in the same directory. By moving the file to the new name, the original files would be removed which is what I want.

I have never been able to accomplish this seemingly simple feat.

--
Ciao

Reply With Quote
  #2  
Old January 6th, 2006, 05:03 AM
Axweildr's Avatar
Axweildr Axweildr is offline
CPAN medic ...
Click here for more information.
 
Join Date: Mar 2003
Location: Location: Location:
Posts: 11,279 Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)Axweildr User rank is General 26th Grade (Above 100000 Reputation Level)  Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Months 22 h 38 m 24 sec
Reputation Power: 2731
Send a message via Google Talk to Axweildr
Orkut
Have you anything to go on, or is this sorted?
__________________
--Ax
without exception, there is no rule ...
The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones


09 F9 11 02
9D 74 E3 5B
D8 41 56 C5
63 56 88 C0
Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
-- Jamie Zawinski
Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > Sorting Directory and Moving File


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway