hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Copy issues

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions
View previous topic :: View next topic  
Author Message
VincentMagnotta



Joined: 28 Jul 2008
Posts: 46

PostPosted: Mon Jan 24, 2011 6:15 pm    Post subject: Copy issues Reply with quote

So the requirement is that we COPY a file to a new name. The rename functionality doesn't appear to work unless we're using RENAME but then the file gets MOVED instead of COPIED (the original no longer exists!).

How can we accomplish our original goal?
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Wed Jan 26, 2011 3:27 pm    Post subject: Reply with quote

give an example of source filename and required target filename.
is target file going to be located in same folder as source file?
Back to top
View user's profile Send private message
VincentMagnotta



Joined: 28 Jul 2008
Posts: 46

PostPosted: Thu Jan 27, 2011 4:17 pm    Post subject: copy with new name Reply with quote

Quote:

give an example of source filename and required target filename.
is target file going to be located in same folder as source file?


Different folders (even different file systems in this case, but it didn't work within the same fs either). In this example the source file is named myfile.dat

from: D:\src\directory
target: \\outputserver\outputpath
copy name: myfile
rename: newname

If I use RENAME then:
I'd expect to see \\outputserver\outputpath\newname.dat and I do! Problem is that the original myfile.dat has disappeared.

If I use COPY:
I end up with \\outputserver\outputpath\myfile.dat and the original is still there.

So either it applies the rename but I lose the original or it applies the copy but won't rename. Seems like RENAME --> MOVE

Any ideas?
Back to top
View user's profile Send private message
VincentMagnotta



Joined: 28 Jul 2008
Posts: 46

PostPosted: Mon Jan 31, 2011 9:34 am    Post subject: any ideas at all Reply with quote

Any reaction? It's been days.
Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 630
Location: Santa Barbara, california

PostPosted: Tue Feb 01, 2011 7:24 pm    Post subject: Reply with quote

The copy mode ignores the rename field, and only supports the append filename field.

Your only option is to do a copy task followed by a rename task of the copied file.
Back to top
View user's profile Send private message Send e-mail
VincentMagnotta



Joined: 28 Jul 2008
Posts: 46

PostPosted: Wed Feb 09, 2011 9:18 am    Post subject: Reply with quote

That seems like a missing feature to me. Since most of these tasks are generated, we now need to generate extra steps for every chain where we want rename-on-copy and it's not that rare.
Back to top
View user's profile Send private message
VincentMagnotta



Joined: 28 Jul 2008
Posts: 46

PostPosted: Wed Feb 09, 2011 10:43 am    Post subject: One more question Reply with quote

Is there a way to get a file list (preferably in a format usable by Copy) of the results of RENAME?

So MyRenameTask renames 5 files. I want to pass that list to MyCopyTask. Is there a way to extract that list as a variable?

I have multiple environments with different versions of Automize. I'm hoping for a cross-version solution but even a solution that only works in 9.0 would leave me ahead of where I am right now.

Thanks!
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Thu Feb 10, 2011 5:09 pm    Post subject: Reply with quote

The copy task did not have a Filenames variable. Large amounts of filenames messed up the variable file.

In 9.03+ , there is an array variable:
ARRAY--TaskTitle--CopiedFiles

You would have to use the 'array to filename' task to convert this array variable into a regular filenames variable.
Back to top
View user's profile Send private message
VincentMagnotta



Joined: 28 Jul 2008
Posts: 46

PostPosted: Tue Feb 15, 2011 9:02 am    Post subject: buggy variable Reply with quote

So, in the windows world that variable formats incorrectly because it doesn't escape the backslashes properly:

Code:

 cba_transaction.txt | D:runCBA_INS_GM_SC20110214cba_transaction.txt | D:runCBA_INS_GM_SC20110214 


The file path above (cell 2) is actually:
Code:

D:\run\CBA_INS_GM_SC\20110214\cba_transaction.txt
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Thu Feb 17, 2011 8:42 am    Post subject: Reply with quote

How are you using this variable?
Just tested and I had no problems with it.
Back to top
View user's profile Send private message
VincentMagnotta



Joined: 28 Jul 2008
Posts: 46

PostPosted: Thu Feb 17, 2011 12:39 pm    Post subject: Reply with quote

Quote:
How are you using this variable?
Just tested and I had no problems with it.


Either in the UI or testing it with Echo.

Since I couldn't get it display properly I'll admit I haven't tried using it in too many other places.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions All times are GMT - 8 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