SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
How do I rename a file & move it using a v

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
How do I rename a file & move it using a v
Author Message
Dominic Klein



Joined: 23 Nov 2001
Posts: 132

Post How do I rename a file & move it using a varia Reply with quote

I have the code below :
// vars
Dim process, number
Dim this_day, date
Dim filename String
// main
Today(this_day)
format(this_day, "mmddyyyy", filename)
Concat( this_day, ".txt", filename )
RunAndWait("c:\\inpro_share\\inpro\code\\micrographics.bat", "", 0, process)
// add full path
Concat( "s:\\inpro\\input\\micrographics\\archive\\", filename, filename )
FileMove("s:\\inpro\\input\\micrographics\\agreements.txt", filename)

It falls over trying to move the file - I want the file to be renamed to todays date.txt and put in my archive folder - I don;t think FileMove likes variable names.
How can I achieve this ?

Thanks.

Wed May 29, 2002 11:53 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: How do I rename a file & move it using a v Reply with quote

The problem is not with a variable, but with the value of that variable. Please run your code in the debugger and make sure the final name of the file to be moved is correct

Anyway, here is the simplified version of your code that you may want to use

// vars
Dim(process, number)
// main
RunAndWait("c:\\inpro_share\\inpro\code\\micrographics.bat", "", 0, process)
FileMove("s:\\inpro\\input\\micrographics\\agreements.txt", &

"s:\\inpro\\input\\micrographics\\archive\\@T"mmddyyyy".txt")

: I have the code below : // vars
: Dim process, number
: Dim this_day, date
: Dim filename String
: // main
: Today(this_day)
: format(this_day, "mmddyyyy", filename)
: Concat( this_day, ".txt", filename )
: RunAndWait("c:\\inpro_share\\inpro\code\\micrographics.bat",
: "", 0, process)
: // add full path
: Concat( "s:\\inpro\\input\\micrographics\\archive\\", filename,
: filename )
: FileMove("s:\\inpro\\input\\micrographics\\agreements.txt",
: filename)

: It falls over trying to move the file - I want the file to be renamed to
: todays date.txt and put in my archive folder - I don;t think FileMove
: likes variable names.
: How can I achieve this ?

: Thanks.

Wed May 29, 2002 12:03 pm View user's profile Send private message
Dominic Klein



Joined: 23 Nov 2001
Posts: 132

Post Re: How do I rename a file & move it using a v Reply with quote

excellent - that works well - thanks.

Fri May 31, 2002 3:30 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.