Zechariah 3:4 (ESV) … “And the angel said to those who were standing before him, “Remove the filthy garments from him.” And to him he said, “Behold, I have taken your iniquity away from you, and I will clothe you with pure vestments.”
In the first vision Zechariah saw Joshua, the high priest, clothed in filthy garments and standing before the Lord. Satan was there to make accusations against Joshua, but a divine advocate came forward to take his case and was so successful that the priest was given new garments and a new ministry.
This vision is highly symbolic and highly significant. The filthy garments indicate that we have no righteousness of our own. The great accuser delights to slander us and parade our faults and failures before God. But “we have an advocate with the Father, Jesus Christ the righteous” (1 John 2:1). He makes His righteousness our righteousness. Whenever Satan tries to raise the issue of our sin, our Advocate simply raises His nail-scarred hands to silence him. God wills out of existence the sins of those who are washed in the blood of the Lamb.
What is true of the Christian believer today was made symbolically true of Joshua in Zechariah’s day and will be made spiritually true of Israel in a coming day. The vision anticipated the glorious day when the nation of Israel will undergo a spiritual rebirth and will be given a spiritual ministry to the nations, as indicated by Joshua’s “fair mitre” (the crown of priesthood Zechariah 3:5), which was symbolic of his new and effective ministry. The very name “Joshua” (Yeshua) was significant, for it was the Old Testament form of the name Jesus. So the vision is of Jesus, He is the One who will remove Israel’s national sins, just as He removes our individual sins.
 Phillips, J. (2009). Exploring the Minor Prophets: An Expository Commentary (Zec 3:1–7). Kregel Publications; WORDsearch Corp.