The entire process is this:
Job a create date folder (Ran at midnight for today)(Completed)
Job b puts files into date folder(Ran at midnight for yesterday)(Completed)
Job c creates month folder (Ran on the first of the month for next month) 
(Completed)
Job d zips date folder into a zip file (Ran at midnight for 
yesterday)(Completed)
Job e deletes date folder(Ran at midnight for yesterday)(Completed)

Job f (This one) I would like to move zip file into month folder  (Ran today 
for 45 days ago)

Job g zips month folder into a zip file (Ran on the first for 2 months 
ago)(Completed)
Job h creates year folder (Ran on the first for next year)(Completed)
Job I deletes month folder (Ran of the first for 2 months ago)(Completed)

Job j (A lot like this one) would move zip file into year folder. (Ran on the 
first of march for last year)

So at the end of the year I will have a year folder with twelve zip files with 
as many as 31 zip files each of them.


-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Ben Scott
Sent: Tuesday, June 03, 2014 8:18 AM
To: [email protected]
Subject: Re: [NTSysADM] copy files to folders

On Tue, Jun 3, 2014 at 7:13 AM, David McSpadden <[email protected]> wrote:
> Copy file x to folder y. Where file x is passed as parm %1 and folder 
> y as parm %2.
> 050114.7z is moved to folder May 2014.
> So today 06/03/2014 the job would be looking at 04/19/2014.

  I'm confused on your requirements.  You're asking to pass the file and folder 
as arguments, but then mention looking at the file name to get the folder name. 
 You also say it's dependent on the date the script would be run.

  Do you build the file name from the current date, or simply take it from the 
first argument?  If you're building the file name, what's the point of the 
first argument?  Or did you mean for the first argument to be the parent folder 
containing the file?

  Do you need to derive the  folder name from the file name, or build the 
folder name from the current date, or simply take the folder name from the 
second argument?  Or is the second argument the parent folder for the folder 
you're deriving/building?

-- Ben




-- Ben


This e-mail and any files transmitted with it are property of Indiana Members 
Credit Union, are confidential, and are intended solely for the use of the 
individual or entity to whom this e-mail is addressed. If you are not one of 
the named recipient(s) or otherwise have reason to believe that you have 
received this message in error, please notify the sender and delete this 
message immediately from your computer. Any other use, retention, 
dissemination, forwarding, printing, or copying of this email is strictly 
prohibited.

Please consider the environment before printing this email.

Reply via email to