AdvancedFileTransfer - Create Timestamp on Filenames

Everything about Control-M Control Modules
Post Reply
User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 29 Sep 2006 7:14

Hi,

You can use AUTOEDIT variables in your filename like that example:

%%YEAR%%MONTH%%DAY.filename.txt

You could find AUTOEDIT Variables in Control-M User Guide

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 02 Oct 2006 4:52

Hi Thomas

Try this example

\\servername\sharename\.%%YEAR.%%MONTH\.%%DAY\.%%TIME\filename..xml

User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

Post by Dilbert » 26 Jun 2008 4:19

I'm trying to copy files (using FTP) to a folder created with time stamps.

I put the dots between the variables: C:\SO\.%%$YEAR.%%MONTH\tmp\
The folder is created by DOS bat file, in format: YYYYMM

But job failed. :(

Here is the sysout:
Dst file: 'C:\SO\.2008CTMERRMONTH\tmp\file_1.txt' on host 'cmem6301sql'
File 'C:\SO\.2008CTMERRMONTH\tmp\file_1.txt' open for overwrite failed
Error[2]: The system cannot find the path specified.


How to solve that?
Tnx!

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 26 Jun 2008 4:45

Try this

replace

C:\SO\.%%$YEAR.%%MONTH\tmp\

by

C:\SO\.%%$YEAR.%%MONTH.\tmp\

User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

Post by Dilbert » 26 Jun 2008 5:24

fyot wrote:Try this

replace

C:\SO\.%%$YEAR.%%MONTH\tmp\

by

C:\SO\.%%$YEAR.%%MONTH.\tmp\
It works, fyot!
But without first dot. ;) (in .%%$YEAR)

Thanks a lot!

User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

AdvancedFileTransfer - Create Timestamp on Filenames

Post by Dilbert » 16 Sep 2008 11:32

OK, another question :)
Every day the file is created, name as, for example, for today: "file-September 16, 2008.pdf"

Tomorrow, file name will be "file-September 17, 2008.pdf"

and so on...

(beware of space between "September" and "number 16, 17, and space between day and year)!

How to create AFT and filewatcher job which will use the exactly filename format described above?

Thanks in advance!

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 16 Sep 2008 2:39

How to create AFT and filewatcher job which will use the exactly filename format described above?


Build dinamically the RULES file that you use in ctmfw utility.

Post Reply