Rearrange file name
Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
7 posts
Page 1 of 1
- Support Specialist
- Posts: 590
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
kgough,
You're option here is to parse the original file name. Something like:
Set FYear = Substring( FName, 3, 4 )
Set FDay = Substring( FName, 8, 2 )
Set FMonth = Substring( FName, 11, 2 )
Then, create your new file name:
Set NewFile = ${ Concat( 'xx', FMonth, '-', FDay, '-', FYear, 'tst.txt' ) }
You're option here is to parse the original file name. Something like:
Set FYear = Substring( FName, 3, 4 )
Set FDay = Substring( FName, 8, 2 )
Set FMonth = Substring( FName, 11, 2 )
Then, create your new file name:
Set NewFile = ${ Concat( 'xx', FMonth, '-', FDay, '-', FYear, 'tst.txt' ) }
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
- Support Specialist
- Posts: 590
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
Not at all .. just use the SetVariable Task
<setVariable label="set FDay" name="FDay" value="${Substring( FName, 8, 2 )}" version="2.0" />
<setVariable label="set FDay" name="FDay" value="${Substring( FName, 8, 2 )}" version="2.0" />
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
When I try that I get an error:
<setVariable label="Set JJ-Day" name="JJ" value="${Substring( LocalFile, 24, 2 )}" version="2.0" />
Variable not found: Substring( LocalFile, 24, 2 )
My main project is Version 1, is that the problem?
Then if I switch to V2 I get an error in my ExecuteOnlyIf
executeOnlyIf="${myLocalFileCount} ge 1"
<setVariable label="Set JJ-Day" name="JJ" value="${Substring( LocalFile, 24, 2 )}" version="2.0" />
Variable not found: Substring( LocalFile, 24, 2 )
My main project is Version 1, is that the problem?
Then if I switch to V2 I get an error in my ExecuteOnlyIf
executeOnlyIf="${myLocalFileCount} ge 1"
- Support Specialist
- Posts: 590
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
Ken,
Upgrading to version 2 will get you a bit more functionality with your Expression Wizard.
When editing the Version 1 project, click on the Upgrade button and convert to Version 2. Then, your Expression Wizard will give you the options you need for the Functions (Substring, Contains, etc)
Don't forget that the syntax of the command changes with this.
${var} eq 'x'
now becomes...
${ var eq 'x' }
Let us know if you have any other questions.
Upgrading to version 2 will get you a bit more functionality with your Expression Wizard.
When editing the Version 1 project, click on the Upgrade button and convert to Version 2. Then, your Expression Wizard will give you the options you need for the Functions (Substring, Contains, etc)
Don't forget that the syntax of the command changes with this.
${var} eq 'x'
now becomes...
${ var eq 'x' }
Let us know if you have any other questions.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
7 posts
Page 1 of 1