Question on PIM Auto-RP and Mapping Agents
Hi Experts,
I have a few basic questions about PIM Auto-RP mechanism.
Please correct my understanding about these below :
Question 1 -
A router, when configured with the command 'ip pim send-rp-announce loopback0 scope 16' announces itself as RP on the multicast address 224.0.1.39. And, the Mapping Agent listens to these messages on 224.0.1.39 and sorts them as (RP,Groups) and re-announces them on 224.0.1.40.
Question 2 -
We know that RP is basically a mechanism for the sparse PIM mode wherein the routers get access to the multicast tree by reaching the RP router. If that is the case, then how do the routers actually get to know about the Auto-RP multicast group 224.0.1.39/40, in order for it to reach the actual RP for the actual multicast group it needs to join ?
Does it mean that the groups 224.0.1.40 and 224.0.1.39 always works in Dense mode fashion that it reaches all routers and is not pruned (as all routers need to disseminate the Auto-RP discovery information .. ?
Question 3 -
I am thinking of trying a multicast configuration on the routers using static-groups and join-group commands.. Would you know of some real nice useful links that have sample multicast lab examples ?
I know there will be a lot of great replies :-)
Cheers
Arav
A1) Yes thats correct announcement on .39 and discovery on .40
A2) For auto-RP to work sparse-dense mode has to be configured. Announcement and discovery happens in dense fashion and when S,G mapping are available it goes the sparse way.There are workarounds to make it work with sparse only, but its better to skip that when deploying in a live environment.
A3) You may not find anything on a link for Multicast Lab as such, but you can try to setup 5 to 8 routers to have a meaningful experimentation with multicast where you can designate 1 end always as source and 1 end as receiver and then play with the core using sparse, dense and sparse-dense, using single RP, multiple RP's.
HTH-Cheers,
Swaroop
Similar Messages
-
Is it mandotary that RP router different form RP mapping agent router ? (i.e is there any that same router can act as RP and mapping agent as well ?)
RouterAgent#(config)ip pim send-rp-discovery scope ttlAs you know that Auto-RP defines two roles in the
PIM domain, the candidate-RP and the mapping agent. The candidate RP uses multicast messages to dvertise itself to the mapping agent.
The mapping agent advertises itself through multicast
messages, and is responsible for group to RP mappings.
Now if RP router also acting as a mapping agent, does RP still use multicast messages to advertise itself to the mapping agent (i.e in the case it will advertise messages to itself) ? -
Auto-Deployment and Restarting Managed Server
Hi,
We are using WebLogic Server 7.0 SP2 on Solaris 8. Yesterday, a developer copied
over a new WAR file into the applications directory. Then he ried to restart the
managed server. This appeared to hang, so he tried restarting the admin. server,
which also failed. Looking at the log, it looks like the admin. server is trying
to deploy apps. from the applications/backup directory.
After I removed the backup directory and edited config.xml to remove all references
to this directory, I was able to startup the Admin. server (though there were
still some errors; see later) and the managed server.
The servers are actually running in "developemnt" mode and have the Aut-Deploy
feature enabled, so my theory is that the auto-deployment was conflicting with
the managed server restart. He shouldn't have had to restart the managed server
since Auto-Deploy is enabled, right?
I'm also wondering about these errors I got when I the Admin. server finally started:
Starting WebLogic Server...
<May 4, 2004 11:41:04 AM MDT> <Notice> <Management> <140005> <Loading configuration
/wlsapp/prod/ivrprod/./config.xml>
<May 4, 2004 11:41:14 AM MDT> <Notice> <Security> <090082> <Security initializing
using realm myrealm.>
<May 4, 2004 11:41:14 AM MDT> <Notice> <WebLogicServer> <000327> <Starting WebLogic
Admin Server "admin" for domain "ivrprod">
<May 4, 2004 11:41:44 AM MDT> <Notice> <Application Poller> <149400> <Activating
application: appsdirbackup_dir>
<May 4, 2004 11:41:49 AM MDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbackup_dir on admin - Running>
<May 4, 2004 11:41:51 AM MDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbackup_dir on admin - Completed>
<May 4, 2004 11:41:54 AM MDT> <Notice> <Management> <141052> <Application Poller
started for development server.>
<May 4, 2004 11:41:54 AM MDT> <Notice> <Application Poller> <149400> <Activating
application: appsdirbackup_dir-0>
<May 4, 2004 11:41:57 AM MDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbackup_dir-0 on admin - Running>
<May 4, 2004 11:41:59 AM MDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbackup_dir-0 on admin - Running>
<May 4, 2004 11:42:02 AM MDT> <Notice> <WebLogicServer> <000365> <Server state
changed to RUNNING>
<May 4, 2004 11:42:02 AM MDT> <Notice> <WebLogicServer> <000360> <Server started
in RUNNING mode>
<May 4, 2004 11:42:13 AM MDT> <Error> <HTTP> <101045> <[ServletContext(id=2268781,name=InternetTroubleshooting,context-path=/backup/
InternetTroubleshooting)] failed to compile /dialogs/ADSLDisambig.jsp, compiler
errors:
/wlsapp/prod/ivrprod/./admin/.wlnotdelete/_appsdir_backup_dir_InternetTroubleshooting_2268781/jsp_servlet/_dialogs/__ADSLDisambig.ja
va:17: package com.nuance.ps.telus does not exist
<May 4, 2004 11:42:20 AM MDT> <Error> <HTTP> <101045> <[ServletContext(id=1642582,name=ReportAPayment,context-path=/backup/ReportAPa
yment)] translation of /dialogs/GetStatus.jsp failed: weblogic.servlet.jsp.JspException:
(line 7): class 'com.nuance.ps.telus.Shared
Storage' could not be loaded>
<May 4, 2004 11:42:20 AM MDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbackup_dir-0 on admin - Running>
<May 4, 2004 11:42:22 AM MDT> <Error> <HTTP> <101045> <[ServletContext(id=3439810,name=TelusLogin,context-path=/backup/TelusLogin)]
translation of /conf/ClearOldKeys.jsp failed: weblogic.servlet.jsp.JspException:
(line 2): class 'com.nuance.ps.telus.SharedStorage'
could not be loaded>
<May 4, 2004 11:42:22 AM MDT> <Error> <Deployer> <149201> <The Slave Deployer
failed to complete the deployment task with id 16 for
the application appsdirbackup_dir.
weblogic.management.ApplicationException: Prepare failed. Task Id = 16
Thanks,
PaulThe short answer to your question is that auto-deployment and multiple
servers don't mix.
If you have a single-server domain and choose to use auto-deployment,
that'll work fine.
Once you have separate admin/managed servers, you need to use
weblogic.Deployer, the wldeploy ant task (8.1), or the console to deploy
applications.
-- Rob
Paul wrote:
Hi,
We are using WebLogic Server 7.0 SP2 on Solaris 8. Yesterday, a developer copied
over a new WAR file into the applications directory. Then he ried to restart the
managed server. This appeared to hang, so he tried restarting the admin. server,
which also failed. Looking at the log, it looks like the admin. server is trying
to deploy apps. from the applications/backup directory.
After I removed the backup directory and edited config.xml to remove all references
to this directory, I was able to startup the Admin. server (though there were
still some errors; see later) and the managed server.
The servers are actually running in "developemnt" mode and have the Aut-Deploy
feature enabled, so my theory is that the auto-deployment was conflicting with
the managed server restart. He shouldn't have had to restart the managed server
since Auto-Deploy is enabled, right?
I'm also wondering about these errors I got when I the Admin. server finally started:
Starting WebLogic Server...
<May 4, 2004 11:41:04 AM MDT> <Notice> <Management> <140005> <Loading configuration
/wlsapp/prod/ivrprod/./config.xml>
<May 4, 2004 11:41:14 AM MDT> <Notice> <Security> <090082> <Security initializing
using realm myrealm.>
<May 4, 2004 11:41:14 AM MDT> <Notice> <WebLogicServer> <000327> <Starting WebLogic
Admin Server "admin" for domain "ivrprod">
<May 4, 2004 11:41:44 AM MDT> <Notice> <Application Poller> <149400> <Activating
application: appsdirbackup_dir>
<May 4, 2004 11:41:49 AM MDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbackup_dir on admin - Running>
<May 4, 2004 11:41:51 AM MDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbackup_dir on admin - Completed>
<May 4, 2004 11:41:54 AM MDT> <Notice> <Management> <141052> <Application Poller
started for development server.>
<May 4, 2004 11:41:54 AM MDT> <Notice> <Application Poller> <149400> <Activating
application: appsdirbackup_dir-0>
<May 4, 2004 11:41:57 AM MDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbackup_dir-0 on admin - Running>
<May 4, 2004 11:41:59 AM MDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbackup_dir-0 on admin - Running>
<May 4, 2004 11:42:02 AM MDT> <Notice> <WebLogicServer> <000365> <Server state
changed to RUNNING>
<May 4, 2004 11:42:02 AM MDT> <Notice> <WebLogicServer> <000360> <Server started
in RUNNING mode>
<May 4, 2004 11:42:13 AM MDT> <Error> <HTTP> <101045> <[ServletContext(id=2268781,name=InternetTroubleshooting,context-path=/backup/
InternetTroubleshooting)] failed to compile /dialogs/ADSLDisambig.jsp, compiler
errors:
/wlsapp/prod/ivrprod/./admin/.wlnotdelete/_appsdir_backup_dir_InternetTroubleshooting_2268781/jsp_servlet/_dialogs/__ADSLDisambig.ja
va:17: package com.nuance.ps.telus does not exist
<May 4, 2004 11:42:20 AM MDT> <Error> <HTTP> <101045> <[ServletContext(id=1642582,name=ReportAPayment,context-path=/backup/ReportAPa
yment)] translation of /dialogs/GetStatus.jsp failed: weblogic.servlet.jsp.JspException:
(line 7): class 'com.nuance.ps.telus.Shared
Storage' could not be loaded>
<May 4, 2004 11:42:20 AM MDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbackup_dir-0 on admin - Running>
<May 4, 2004 11:42:22 AM MDT> <Error> <HTTP> <101045> <[ServletContext(id=3439810,name=TelusLogin,context-path=/backup/TelusLogin)]
translation of /conf/ClearOldKeys.jsp failed: weblogic.servlet.jsp.JspException:
(line 2): class 'com.nuance.ps.telus.SharedStorage'
could not be loaded>
<May 4, 2004 11:42:22 AM MDT> <Error> <Deployer> <149201> <The Slave Deployer
failed to complete the deployment task with id 16 for
the application appsdirbackup_dir.
weblogic.management.ApplicationException: Prepare failed. Task Id = 16
Thanks,
Paul -
Auto Levels and other adjustments
Just a small question..will auto levels and other adjustments degrade a photo quality. I most of the times use auto levels before developing a photo and I want to make sure that I keep the same quality of the original image after using adjustments.
Thanks in advance.If you have limited skills-two schools of thought. Quality will be better if you fine tune- if you put in a little more time-learn full Photoshop, but not everyone has the time-interest or capibilities.
1) If U R only WANT to make basic changes--check out the IMAGE drop-down in PS. You can auto adjust -Color-Tone and Contrast by just clicking on the drop-down.
Are you asking this Q in order becaus you have limited time put into your images? If so, then your capibilities should drive your actions. Go auto but know with digital photography, anyone can take a great shot.
2) If you want to do more with your phontography, learn more about Photoshop CS. 8 months ago-I thought I understood PS. Then I got serious about it. The difference is stunning
Bottom line-you will learn more by trial and error-reading-online info and video. There is a great deal of info out there.
With the advent of digital photogrphy-even rookies can come up with amazing images. Dont short change yourself by being lazy-or just going "auto-all." Make your photos shine
Take your best shot--invest more time-in Photoshop. There is magic out there. Find it
Good luck -
Question on router connecting extender with auto config and upgrading firmware
Hello I have a question regarding my linsys 160n and my wre54g extender. I am going to reset my linsys 160n with dd-wrt on it to the factory defaults, then set it up but leaving the security disabled to then setup my linsys wre54g extender since it has the auto configuration option. Once i have this completed would i be able to then enable the security on the router and the extender?
Also, just noticed that when i flashed the firmware from original to the dd-wrt i did not reset the router or reset to defaults before i upgraded the firmware to dd-wrt. Will this have issues for me? I thought i read you are supposed to reset or set to factory defaults before flashing firmware to dd-wrtThe best way to configure your WRE with your Routers Secured Wireless Network... Once you secured your Wireless Network on your Router..... Connect the WRE to the Router using an Ethernet Cable.
Hardwired anyone of your computer to the Router.... Open an Internet Explorer browser page on your wired computer(desktop).In the address bar type - 192.168.1.240 and press Enter...Leave Username blank & in Password use admin in lower case...
Once you login to the WRE setup page, you need to match the Wireless Settings which you have input on your Router... Once you configure all the settings on WRE... then unplug the Ethernet Cable from WRE and then unplug the Power from WRE.... Wait for 30sec and then re-connect the Power to WRE. One both the Lights are Blue on WRE, these means your WRE is configured properly and ready to use. -
Inbox rules (auto reply) and Outbox rules questions
I'm checking incoming messages for a certain subject. If the subject contains the string I want to auto-reply with a certain message.
The auto-reply works, but I notice the message doesn't show up in the Sent maibox. Is there a reason for that?
Also, I have an Outbox rule set up to forward the auto-reply mail to another address. That doesn't seem to take place.
What I really want to accomplish is just to auto-reply and bcc the auto-reply to a 3rd email address. Is that possible?
Thanks!
dougHi.
On 05.03.2014 06:38, Thomas Roberts wrote:
> We up-stream to an smtp relay server that has some strict rules in place. They
> are not our ISP but have white listed our domain name to allow us to relay through.
> Things work well but now auto replies like vacation rule messages now bounce.
Apart from Lauras excellent answer, make your relay provider whitelist
your hostname and put it back in place. The hostname *is* important,
even when using a relay, and is used as sender for other mails, like
error messages.
CU,
Massimo Rosen
Novell Knowledge Partner
No emails please!
http://www.cfc-it.de -
Unable to auto-start cache and replication agents
Hi,
Everytime we start server, we need to manually start cache and replication agents!
Is there any way to configure them starting automatically???Yes:
ttAdmin -repPolicy always -cachePolicy always DSN
Chris -
Hello,
I have a problem with two of my servers. I have ~200 servers which are updating fine through WSUS. The settings are as you can see "3 - Auto download and notify for install" in the GPO.
This is the correct setting. I want to achieve that I can install the updates whenever I want on these servers. On client computers there is a strict schedule with auto installs.
My GPO works fine for 98% of my servers. On two servers (a big file server and a TMG server) the settings are made as you can see in the screenshots, but the updates still get installed automatically.
I have no idea what I'm doing wrong here... It is a big problem for me that updates get installed automatically on these servers.
Although the Policy and the Registry both say 3 the server behaves like option 4 is active.
I would be very thankful for any input on how to find out what's the issue here.and was not able to find any sign of an admin installing it in the WindowsUpdate.log.
Then the Windows Update Agent DID NOT install this update, and it's not really a WSUS issue.
My typical response to such a claim would be to ask you to show me in the WindowsUpdate.log where the update was installed... but it seems that request has already been answered.
The more relevant question it seems, is HOW DID these updates allegedly get installed?
Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
SolarWinds Head Geek
Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
http://www.solarwinds.com/gotmicrosoft
The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds. -
Try to install Microsoft for Mac 2011 14.4.5 update on macbook air (mid 2013 unit). Says must shout down Microsoft Database Daemon and SynchServices Agent. there seems to be no way to do that. Please advise how to shut down so install can commence.
Hi,
Please take a look at this KB article, it talks about the exact issue. Try the solution there and see if it helps:
http://support.microsoft.com/kb/2482074/en-us
Also, you can start your Mac in safe model, this will stop those programs from loading. Then try auto-update in safe mode:
http://support.apple.com/kb/PH14204?viewlocale=en_US
This is the forum to discuss questions and feedback for Microsoft Office on Windows system, better to post your question to the forum for Office for Mac:
http://answers.microsoft.com/en-us/mac/forum/macoffice2011?tab=Threads
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
Thanks,
Ethan Hua CHN
TechNet Community Support -
WSUS - Auto Download and Schedule Install
Hey, so I have a couple questions regarding WSUS:
1. Can computers be set to daily check for updates from an internal WSUS server and download them without installing, and then automatically install those
updates at a different, scheduled time, whether they are connected or not? (I see the GPO called "Automatic Updates detection frequency"
that I can configured, but it doesn't say whether updates are downloaded during this operation or not)
2. Can computers be configured so that
they will download updates from an internal WSUS server first and if it's not available, then reach out to Microsoft?So that would mean the answer to my initial question is No. I want an option called "Auto download and install at scheduled time".
Let me clarify how this all works.
The Windows Update Agent periodically checks the WSUS server for updates. Updates it finds, it reports state for: Installed, Not Installed, Not Applicable. If a "Not Installed" update is approved and available, the WUA queues the installation files
for download if the Configure Automatic Updates policy is set to AUOption '3' or '4'.
The download occurs via Background Intelligent Transfer Service (BITS) subsequent to the WUA finding the update as available for download.
When the download of the update is completed, the WUA does one of two things:
If the Configure Automatic Updates policy is set to AUOption '4', then the WUA will schedule the update for installation at the scheduled time. This scheduled installation does NOT require access to the WSUS server to be conducted.
If the Configure Automatic Updates policy is not set to AUOption '4', then the update will be retained on the client computer until a user launches the Windows Update applet from Control Panel and initiates the installation.
If the Configure Automatic Updates policy is set to AUOption '2', then the files will not be downloaded, and a logged on user must initiate the download using the Windows Update applet in Control Panel. This setting is typically used for highly mobile
computers that have only sporadic connections to the network servicing the WSUS server.
The downloading of files using BITS can be controlled using the BITS download policies in Group Policy. You can restrict the bandwidth used for downloads (per client) and/or restrict when those downloads are performed. Ergo, if you want downloads to
occur at 8pm each night, simply block the ability to download files prior to 8pm.
Please note, however, that the files MUST be completely downloaded BEFORE a scheduled installation event for the updates to be installed at that event, and the amount of time required to complete those downloads is highly unpredictable and will change from
month to month and client to client.
Finally, there is one last possible methodology, but this one is fraught with much risk. You can configure clients with AUOption '2', so they do not automatically download update files upon discovery. Then configure an Approval Deadline at the time you want
those updates to be installed. In this scenario, and ONLY this scenario, when the client reaches the Approval Deadline, it will automatically download -and- install the updates that have deadlines configured. In addition, this methodology also gives you some
capability to configure the *DAY* that updates are installed, not just the time. However, as several threads in this forum will attest, there are MANY opportunities using deadlines for things to go sideways. Be sure to anticipate ALL POSSIBLE scenarios before
initiating the use of Approval Deadlines, and more importantly! TEST! TEST! TEST! prior to implementing this methodology throughout the entire organization.
Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
SolarWinds Head Geek
Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
http://www.solarwinds.com/gotmicrosoft
The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds. -
How to handle security with Auto-Versions and Time Machine?
I've upgraded to OS X Lion, which of course now has the new automatic "versions" system.
Today, I created a text file in TextEdit, containing highly sensitive data that I must keep absolutely secure (well, you know -- as best I can.) The file was eventually copied to an encrypted sparse disk image (.dmg) and the original on my desktop deleted trashed and emptied.
But before that happened, Lion had already saved two copies of the file through the new versions sytem --and-- one copy in regular old Time Machine! So much for keeping the file secure. (OK -- not "copies" but delta data. Whatever. )
EDIT: OK ... I found how to "Delete all backups ..." from within Time Machine. (I feel silly for not finding that before!) But the real question here relates to manual and auto-save versions from the likes of TextEdit and any residual data that may leave lying around, despite the file seemingly having been deleted.
My questions should now be fairly obvious ...
Does "Delete all backups" from within TimeMachine also delete all data from the "versions" system? One would assume so. But I don't like to assume.
Can one somehow pre-emptively flag a file to not be recorded by versions or Time Machine?
Someone in some post noted that a file could be "locked" to prevent these issues altogether. But I can find no informtaion about such a thing, either by further googling or poking around in menus locally.
EDIT: Good grief! You spend ages trying to find something, then you post on here and it magically appears. You can click the title bar of TextEdit to produce a pull-down (that's new!), which shows an option to "Lock".
So this one is just about answered by myself -- except for the part about whether "version delta" info is also removed when "Delete all backups" is used from within Time Machine.
Any help will be much appreciated. Thanks.
Bryan.If you're dealing with highly sensitive data, you should enable FileVault on your primary and backup volumes. That's the only way to ensure that all copies of your files will always be encrypted. Needless to say, you have to be very sure you won't lose the password. Optionally, you can store an alternate decryption key on Apple's servers, but then you have to trust Apple.
That said, in my opinion it's too soon after the release of Lion to trust FileVault completely. -
Data Type, Message Type and Mapping for FTP
Thanks in advance for your replies.
As our first production XI scenario, we need to move several (at least 46) files from our SAP instance to a couple of different servers to support our legacy systems. Once all locations are on SAP this requirement should go away.
I only want to pick up the file from the one server and place it on the other and this leads me to some questions.
How do I define the Data Type and Message Type for each of the files? Do I need to consider the size of the record in each interface and create DT/MT with different sizes.
Do I need a mapping program that simply maps one structure to the other?I recently completed a similar exercise.
It looks like this...
server1 ftp (Sender - delete file) - XI - Server2 ftp (receiver - create file). This will move the file from one server to another.
I used the same schema and mapped fields on a one to one basis.
The Size of the files I process are between 6kb and 500kb each, but the mapping/fields remain constant, just the numebr of items change.
Worked seemelessly for the last three weeks (since go-live) -
Auto login and report launch for Web Discoverer Plus?
What url format can I use to auto connect and launch a report in
the web version of Discoverer Plus?
I've been able to do this fine with Viewer and client/server
Plus...
Each time I try something it brings me back to the "start_ie.htm"I found the answer to my own question:
To login in "applicatino mode" you must login like this:
<app_user_name>:responsibility
OR
<app_user_name>:
Then you'll be prompted to choose a pre-assigned responsibilty. -
Creating/Testing and Using Agents for ODI Sequence
Hi
can you/anyone please tell/guide me how to Create a agent and use ODI sequence when i am doing File-to-File Mapping?
I created an ODI sequence and an agent too. but i am unable to use this sequence coz it gives error like Connection fail for agent.
and more over when I am testing my agent for connection my Application hangs and I have no choice but to close it forcefully and re-start.
I am giving host as my target server IP and Port as my target's port (Same as defined in DataServer' URL).
Please Advise/Help/Suggest.Hi
can you/anyone please tell/guide me how to Create a agent and use ODI sequence when i am doing File-to-File Mapping?
I created an ODI sequence and an agent too. but i am unable to use this sequence coz it gives error like Connection fail for agent.
and more over when I am testing my agent for connection my Application hangs and I have no choice but to close it forcefully and re-start.
I am giving host as my target server IP and Port as my target's port (Same as defined in DataServer' URL).
Please Advise/Help/Suggest. -
Would a 347 MB file be slow? Auto save and auto type turn off?
I am doing an art inventory and add jpegs of the art. I don't resize them they range from 750k to 3MB. I guess if it is slowing the program down i should? It currently is 267 rows by about 18 columns.
Thanks in advance.
Oh can I turn off auto save and auto type? That may help. How do I do that?Done.
Enter Scrip Editor
paste the posted script
File > Save > as Script on the Desktop
Move the script to the folder :
Macintosh HD:Library:Scripts:Folder Action Scripts:
CAUTION, you will be asked to enter your pasword.
Create a folder to do the job. I named mine Normalized. I created mine on the Desktop where it's easy to reach.
Go to :
Macintosh HD:Library:Scripts:Folder Actions:
Double click the alias : Configure Folder Actions
Below the left column, click
navigate to select your new folder
Below the right column, click
select the script image - normalize400.scpt
After that, drag and drop a picture file onto your folder.
The original will be move in the folder Originals (isn’t it original ?)
and a reduced copy 400 x height will be stored in the folder Normalized images.
And now, here is the script :
--{code}
Image - Normalize
This Folder Action handler is triggered whenever items are added to the attached folder.
The script rotates the image counter-clockwise (left).
Copyright © 2002–2007 Apple Inc.
You may incorporate this Apple sample code into your program(s) without
restriction. This Apple sample code has been provided "AS IS" and the
responsibility for its operation is yours. You are not permitted to
redistribute this Apple sample code as "Apple sample code" after having
made changes. If you're going to redistribute the code, we require
that you make it clear that the code was descended from Apple sample
code, but that you've made changes.
modified by Yvan KOENIG (VALLAURIS, France)
2011/12/08
This version normalize pictures so that
(1) the greater dimension become the width one (rotate left if needed)
(2) this greater dimension is ruled by the property maxWidth defined below.
property maxWidth : 400
-- set it to fit your needs
property done_foldername : "Normalized Images"
property originals_foldername : "Original Images"
property newimage_extension : "jpg"
-- the list of file types which will be processed
-- eg: {"PICT", "JPEG", "TIFF", "GIFf"}
property type_list : {"TIFF", "GIFf", "PNGf", "PICT", "JPEG"}
-- since file types are optional in Mac OS X,
-- check the name extension if there is no file type
-- NOTE: do not use periods (.) with the items in the name extensions list
-- eg: {"txt", "text", "jpg", "jpeg"}, NOT: {".txt", ".text", ".jpg", ".jpeg"}
property extension_list : {"tif", "tiff", "gif", "png", "pict", "pct", "jpeg", "jpg"}
on adding folder items to this_folder after receiving these_items
tell application "Finder"
if not (exists folder done_foldername of this_folder) then
make new folder at this_folder with properties {name:done_foldername}
end if
set the results_folder to (folder done_foldername of this_folder) as alias
if not (exists folder originals_foldername of this_folder) then
make new folder at this_folder with properties {name:originals_foldername}
set current view of container window of this_folder to list view
end if
set the originals_folder to folder originals_foldername of this_folder
end tell
try
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
set the item_info to the info for this_item
if (alias of the item_info is false and the file type of the item_info is in the type_list) or (the name extension of the item_info is in the extension_list) then
tell application "Finder"
--set name of this_item to "YK#" & (text -4 thru -1 of ("0000" & i))
my resolve_conflicts(this_item, originals_folder, "")
set the new_name to my resolve_conflicts(this_item, results_folder, newimage_extension)
set the source_file to (move this_item to the originals_folder with replacing) as alias
end tell
process_item(source_file, new_name, results_folder)
end if
end repeat
on error error_message number error_number
if the error_number is not -128 then
tell application "Finder"
activate
display dialog error_message buttons {"Cancel"} default button 1 giving up after 120
end tell
end if
end try
end adding folder items to
on resolve_conflicts(this_item, target_folder, new_extension)
tell application "Finder"
set the file_name to the name of this_item
set file_extension to the name extension of this_item
if the file_extension is "" then
set the trimmed_name to the file_name
else
set the trimmed_name to text 1 thru -((length of file_extension) + 2) of the file_name
end if
if the new_extension is "" then
set target_name to file_name
set target_extension to file_extension
else
set target_extension to new_extension
set target_name to (the trimmed_name & "." & target_extension) as string
end if
if (exists document file target_name of target_folder) then
set the name_increment to 1
repeat
set the new_name to (the trimmed_name & "." & (name_increment as string) & "." & target_extension) as string
if not (exists document file new_name of the target_folder) then
-- rename to conflicting file
set the name of document file target_name of the target_folder to the new_name
exit repeat
else
set the name_increment to the name_increment + 1
end if
end repeat
end if
end tell
return the target_name
end resolve_conflicts
-- this sub-routine processes files
on process_item(source_file, new_name, results_folder)
-- NOTE that the variable this_item is a file reference in alias format
-- FILE PROCESSING STATEMENTS GOES HERE
try
-- the target path is the destination folder and the new file name
set the target_path to ((results_folder as string) & new_name) as string
with timeout of 900 seconds
tell application "Image Events"
launch -- always use with Folder Actions
set this_image to open file (source_file as string)
set {oldW, oldH} to dimensions of this_image
if oldH > oldW then
set {oldW, oldH} to {oldH, oldW}
rotate this_image to angle 270.0
end if
set |échelle| to maxWidth / oldW
if |échelle| < 1 then scale this_image by factor |échelle|
save this_image as JPEG in file target_path with icon
close this_image
end tell
end timeout
on error error_message
tell application "Finder"
activate
display dialog error_message buttons {"Cancel"} default button 1 giving up after 120
end tell
end try
end process_item
--{code}
Yvan KOENIG (VALLAURIS, France) jeudi 8 décembre 2011 21:25:33
iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
My iDisk is : <http://public.me.com/koenigyvan>
Please : Search for questions similar to your own before submitting them to the community
Maybe you are looking for
-
No initial load of Customers, Material and delta load of Sales Orders.
Hi Experts, I am facing a very troublesome issue. I am not able to setup the Middleware portion for initial and delta loads. I read a lot of documents and corrected a lot of things. finally, the connectivity is done with R/3 and CRM. Initial load of
-
Solved! Go to Solution.
-
ITunes charges for the Million Hit Lowdown free previews
I downloaded one of the previews yesterday without any issue and no charge, but today when I went to watch the other two I got charged 1.99 each for the intro video and the preview itself... e-mail sent to support. Windows XP
-
IPad mini retina - native video frame rate
I'm trying to shoot 30fps HD video with my iPad mini (Retina). I was under the impression that the iPad mini's native video format is 30fps. But when I import my footage into iPhoto, it turns out to be only 24fps. So - what's the Mini's correct nativ
-
My parallel port cannot work on win2000 and new pc
I was troubled by the reading/writing from parallel port on win2000 for a long time. I had made my programs work on win2000/OLD PC, but i failed with the same programs on win2000/new PC. I tried with the method from the forum, that is, install access