SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Here's a good one!

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Here's a good one!
Author Message
dave



Joined: 16 Jun 2003
Posts: 41

Post Here's a good one! Reply with quote

I need 24x7 on a monthly basis to look in a directory
and copy all .XLS files to in the directory to another directory.
The catch is there will be other file types there i.e.
.doc, .jpg. I only need the .xls files copied and there will
be multiple .xls files.

Is this possible? Either JAL or VBS will be fine.

As always Thanks for your help. :)

Thu Jan 06, 2005 5:14 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Here's a good one! Reply with quote

In JAL it is as simply as 2 lines of code(see below). In VBScript it can be also done with a few more lines. In command line job it is as simple as
cmd /C copy c:\source_dir\*.xls d:\target_dir

The catch here is that if copy failesfor some failes you will not know that unless you explicitly check if there were any XLS files left

Here is a JAL script to do the same and automatically raise job failure if copying fails for any file

Dim( file_count, number)
FileCopyEx("c:\\source_dir\\*.xls", "d:\\target_dir", file_count)

If you want to log how many files have been copied each time this job is run you can add at the end of the script the following 3 lines

Dim( message, string )
Concat( file_count, " file(s) copied", message)
LogAddMessageEx(V@"job_id", "@V"job_name", "INFO", message )

: I need 24x7 on a monthly basis to look in a directory
: and copy all .XLS files to in the directory to another directory.
: The catch is there will be other file types there i.e.
: .doc, .jpg. I only need the .xls files copied and there will
: be multiple .xls files.

: Is this possible? Either JAL or VBS will be fine.

: As always Thanks for your help. :)

Thu Jan 06, 2005 6:02 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.