# Powershell Amateur (AT BEST) needs some help

**URL:** <https://forums.powershell.org/t/powershell-amateur-at-best-needs-some-help/13039>\
**Category:** PowerShell Help\
**Created:** [August 22, 2019, 10:11pm UTC](https://forums.powershell.org/t/powershell-amateur-at-best-needs-some-help/13039 "2019-08-22T22:11:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcoil](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@rcoil](https://forums.powershell.org/u/rcoil)\
**Post date:** [August 22, 2019, 10:11pm UTC](https://forums.powershell.org/t/powershell-amateur-at-best-needs-some-help/13039/1 "2019-08-22T22:11:05Z")

</div>

Good afternoon all;

My developer left the company and unfortunately a good chunk of the stuff he was working on has fallen to me. As such, I have a question which some of you wizards probably know the answer to.

Situation: I have an undelimited, fixed length file (39 characters wide), approximately 2 million lines provided to us by our illustrious government. I need to be able to either insert commas at 13 character intervals and once that is done, I need to be able to insert decimal points two characters from the right of column 2 and 3. I have actually figured out how to do everything else that I need to do but these two items are kicking my posterior (and hurting my pride).

&nbsp;

Any help you could offer would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [August 23, 2019, 12:36am UTC](https://forums.powershell.org/t/powershell-amateur-at-best-needs-some-help/13039/2 "2019-08-23T00:36:37Z")

</div>

So you are working with [strings](https://4sysops.com/archives/strings-in-powershell-replace-compare-concatenate-split-substring/). You could use the [Substring() method](https://ss64.com/ps/substring.html) to cut a long string into smaller pieces for further use.  
If you’d show your code we might be able to tweak it a little bit for you.

---

<div class="post-metadata">

**Author:** ![rcoil](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@rcoil](https://forums.powershell.org/u/rcoil)\
**Post date:** [August 26, 2019, 11:05am UTC](https://forums.powershell.org/t/powershell-amateur-at-best-needs-some-help/13039/3 "2019-08-26T11:05:19Z")

</div>

Thanks Olaf - I ended up figuring this one out doing using substrings as you mentioned. My script is not elegant but it does work. 🙂

---

<div class="post-metadata">

**Author:** ![jasonrobertson](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/jasonrobertson/32/164_2.png) [@jasonrobertson](https://forums.powershell.org/u/jasonrobertson)\
**Post date:** [August 26, 2019, 7:03pm UTC](https://forums.powershell.org/t/powershell-amateur-at-best-needs-some-help/13039/4 "2019-08-26T19:03:06Z")

</div>

Rcoil26,

Provide us the script to review and see what we can do to make it better? Once the script works the next step is to increase efficiency. I would recommend you to study the Measure-Command commandlet. It’s a great command to measure how long a command/ script takes to run.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:31pm UTC](https://forums.powershell.org/t/powershell-amateur-at-best-needs-some-help/13039/5 "2024-05-16T20:31:45Z")

</div>


