Forum Index  ViceVersa HOME         FAQ and Knowledge Base

 FAQForum FAQ   SearchSearch Forum  RegisterRegister 
 ProfileProfile   Log inLog in 

How to run a script after the execution of a specific pair?

 
Post new topic   Reply to topic     Forum Index -> Support
Author Message
Wollrabe



Joined: 26 Aug 2010
Posts: 35

PostPosted: Fri Aug 27, 2010 7:28 pm    Post subject: How to run a script after the execution of a specific pair? Reply with quote

In your help, you show the naming convention for running a script on a specific pair prior to the execution of a copy. But I don't see any instructions on what naming convention to use when running a script on a specific pair at the end of the execution of that pair. Here's your instruction for running a script on a specific pair prior to execution:

You can also specify scripts to run for each source/target pair. These scripts are run after the above scripts but before comparison:

* profilename_xxxx_startY.bat (batch file)

* profilename_xxxx_startY.cmd (command file)

* profilename_xxxx_startY.vbs (visual basic script)

* profilename_xxxx_startY.js (javascript)

* profilename_xxxx_startY.ps1 (powershell)

where Y is the folder number, i.e. 1,2,3 (1 is the first source/target pair, 2 is the second source/target pair, etc.) and xxxx is the word auto or manual.
Example: syncnetwork_auto_start1.bat, syncnetwork_auto_start1.cmd, syncnetwork_auto_start1.vbs, syncnetwork_auto_start1.js


I take it that it might look like this, but it does not work:
profilename_manual_end2.bat --- if I want to run the bat file after the 2nd pair completes it's execution.

I take it that profilename = the name of the profile that you have loaded and are running.

Thanks!
Back to top
Wollrabe



Joined: 26 Aug 2010
Posts: 35

PostPosted: Fri Aug 27, 2010 7:33 pm    Post subject: Running a checkin bat file after the copy Reply with quote

The reason I need to run a script on a specific pair is because I first copy the files to a central build dfs share (pair 1) and then I copy the files to a subversion repository. (pair 2). IF I only have one pair, I can copy to the subversion repository, and I run the bat file which contains the checkin command, it works perfectly. But if I have multiple pairs, I can't get the script to run on Pair 2?
Back to top
Wollrabe



Joined: 26 Aug 2010
Posts: 35

PostPosted: Mon Aug 30, 2010 3:56 pm    Post subject: Any ideas? Reply with quote

Any Ideas?
Back to top
Wollrabe



Joined: 26 Aug 2010
Posts: 35

PostPosted: Mon Aug 30, 2010 4:42 pm    Post subject: The %VV_TARGET_FOLDER% is returning both destinations Reply with quote

I have two pairs of source/destination's, when the script runs it is failing.
I'm using the %VV_TARGET_FOLDER% variable to run the script on the target folder. But the variable is returning both destination folders, separated with a pipe. Here's the log file:

2010-08-30 09:35:19 : Running script \\HFILE\Production_Control\VVProfiles\TEST-Bluebird\TEST-Bluebird_manual_start2.bat
2010-08-30 09:35:20 : Script Output:
2010-08-30 09:35:20 : C:\WINDOWS>TortoiseProc.exe /command:commit /path:"\\SPNPF0120\SourceControl\Deployment_Test\Bluebird\ | \\hqsvnp01.bud.bpa.gov\svn_HANDOFF\TEST_Blackbird\CHECKIN\"
2010-08-30 09:35:20 : End Script Output
2010-08-30 09:35:20 : Script return code: 100

I just want the script to run on the second destination path.
Back to top
TGRMN Software
Site Admin


Joined: 10 Jan 2005
Posts: 8763

PostPosted: Tue Aug 31, 2010 12:39 pm    Post subject: Reply with quote

Hi, yes the variable is not adjusted for each pair, it is always the whole path with both pairs. You could setup 2 profiles, one pair per profile, and schedule them to run sequentially using VVEngine: http://www.tgrmn.com/web/vvengine/vvengine.htm
_________________
--
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com
Back to top
Wollrabe



Joined: 26 Aug 2010
Posts: 35

PostPosted: Tue Aug 31, 2010 3:53 pm    Post subject: Thanks, or a i could create a parsing script? Reply with quote

Yes, that is what I have been doing. One profile for versioning. And another profile for distributing to all the servers. One thought I had, was to create a script that, if I always put the versioning as the first pair, have the script grab the path directly before the '|' delimiter. And run the script against that path only.

Maybe you could add this to the new features! To be able to run a script on only one pair. You help says you can, but it doesnt work, so you may want to fix that as well.
Back to top
Wollrabe



Joined: 26 Aug 2010
Posts: 35

PostPosted: Tue Aug 31, 2010 7:14 pm    Post subject: Wish list Reply with quote

It would be cool to be able to modify the variable to pull specifically the target path of the pair that you wish to extract.

%VV_TARGET_FOLDER1% = the target path for pair 1
%VV_TARGET_FOLDER2% = the target path for pair 2
%VV_TARGET_FOLDER3% = the target path for pair 3
etc...

That way you could pass that target path for a specific pair, to lets say a version control tool. That means you could have one profile that does the Versioning and the Deployment to servers, all in one easy button!
Back to top
TGRMN Software
Site Admin


Joined: 10 Jan 2005
Posts: 8763

PostPosted: Wed Sep 01, 2010 12:03 pm    Post subject: Reply with quote

Thanks, added to the list of possible improvements for next release!
_________________
--
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com
Back to top
Wollrabe



Joined: 26 Aug 2010
Posts: 35

PostPosted: Tue Sep 28, 2010 11:10 pm    Post subject: Wrote a VBScript for parsing log file Reply with quote

I was able to write a VBScript that parses out the log file. It captures each individual file name that was copied, where it came from, where it was copied to, and in my case where it was versioned to. With no duplicate paths listed. The output is sent to a HTML form. One script fires off the Tortoise SVN Commit screens, once the Commit is done, It fires off the parsing script which fills out the HTML form. Once that is displayed, it prompts you to Delete the files from it's Source location.
Back to top
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Support All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can 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 © phpBB Group
Copyright © TGRMN Software. TGRMN Software products: