SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Renaming file to current date (scheduled)

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Renaming file to current date (scheduled)
Author Message
Martijn de Lange



Joined: 22 Nov 2000
Posts: 6

Post Renaming file to current date (scheduled) Reply with quote

Every night I'm downloading data from a secure website. The problem is that the filename doesn't change. To organize and backup the downloaded files I need to rename the files to the current date including a part of the original name (eg results.arj -> re221100.arj). It's verry important that I can do this within a week from now. So if you can help me with this, please help me!

Since I never made scripts of my own I want to ask you if you can make a script for me.

Thank you verry much!

Regards,

Martijn

Wed Nov 22, 2000 12:52 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7842

Post Re: Renaming file to current date (scheduled) Reply with quote

FileRename( "[file path]\results.arj", "[file path]\re@T"ddmmyy".arj")
Replace file path fith the actual path

Note that you can also use @T in the command line like
cmd /b rename [file path]\results.arj [file path]\re@T"ddmmyy".arj

This command can be scheduled to run as "program type" job

: Every night I'm downloading data from a secure website. The problem is that
: the filename doesn't change. To organize and backup the downloaded files I
: need to rename the files to the current date including a part of the
: original name (eg results.arj -> re221100.arj). It's verry important
: that I can do this within a week from now. So if you can help me with
: this, please help me!

: Since I never made scripts of my own I want to ask you if you can make a
: script for me.

: Thank you verry much!

: Regards,

: Martijn

Wed Nov 22, 2000 2:53 pm View user's profile Send private message
Martijn de Lange



Joined: 22 Nov 2000
Posts: 6

Post Re: Renaming file to current date (scheduled) Reply with quote

Thank you for this quick respons! You've helped me a lot!

Regards,

Martijn

: FileRename( "[file path]\results.arj", "[file
: path]\re@T"ddmmyy".arj")
: Replace file path fith the actual path

: Note that you can also use @T in the command line like
: cmd /b rename [file path]\results.arj [file path]\re@T"ddmmyy".arj

: This command can be scheduled to run as "program type" job

Thu Nov 23, 2000 4:30 am View user's profile Send private message
Martijn de Lange



Joined: 22 Nov 2000
Posts: 6

Post Re: Renaming file to current date (scheduled) Reply with quote

I tried to run this as a jal script, but it doesn't work. This is wat I entered in the box "job automation script":
FileRename( "d:\inetpub\ftproot\incoming\hcn\rip\results.arj", "d:\inetpub\ftproot\incoming\hcn\rip\results@T"ddmmyy".arj" )
The program gives me the following error: "Source file not found". But the source file really is in this directory.

Strange is that the following string does work:
FileRename( "results.arj", "results@T"ddmmyy".arj" )
How can the program know where the file "results.arj" is located on the hd? The source file still is in the directory rip (see above)!

What is going wrong? Can you please make a script for me that I can just import in the job. This is what I would like to do.

- Rename the file results.arj (wich is located in the directory shown above)to the original name including the current date and than move it to d:\inetpub\ftproot\incoming\hcn\rip\backup\.

Thank you verry much!

Regards,

Martijn

: FileRename( "[file path]\results.arj", "[file
: path]\re@T"ddmmyy".arj")
: Replace file path fith the actual path

: Note that you can also use @T in the command line like
: cmd /b rename [file path]\results.arj [file path]\re@T"ddmmyy".arj

: This command can be scheduled to run as "program type" job

Thu Nov 23, 2000 6:04 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7842

Post Re: Renaming file to current date (scheduled) Reply with quote

FileRename(
"d:\\inetpub\\ftproot\\incoming\\hcn\\rip\\results.arj",
"d:\\inetpub\\ftproot\\incoming\\hcn\\rip\\results@T"ddmmyy".arj"
)

: I tried to run this as a jal script, but it doesn't work. This is wat I
: entered in the box "job automation script": FileRename(
: "d:\inetpub\ftproot\incoming\hcn\rip\results.arj",
: "d:\inetpub\ftproot\incoming\hcn\rip\results@T"ddmmyy".arj"
: )
: The program gives me the following error: "Source file not found".
: But the source file really is in this directory.

: Strange is that the following string does work: FileRename(
: "results.arj", "results@T"ddmmyy".arj" )
: How can the program know where the file "results.arj" is located on
: the hd? The source file still is in the directory rip (see above)!

: What is going wrong? Can you please make a script for me that I can just
: import in the job. This is what I would like to do.

: - Rename the file results.arj (wich is located in the directory shown
: above)to the original name including the current date and than move it to
: d:\inetpub\ftproot\incoming\hcn\rip\backup\.

: Thank you verry much!

: Regards,

: Martijn

Fri Nov 24, 2000 9:13 am 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.