# Adding Date to a file

**URL:** <https://forums.powershell.org/t/adding-date-to-a-file/20003>\
**Category:** PowerShell Help\
**Created:** [July 27, 2022, 3:54pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003 "2022-07-27T15:54:21Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdavis](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jdavis](https://forums.powershell.org/u/jdavis)\
**Post date:** [July 27, 2022, 3:54pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/1 "2022-07-27T15:54:21Z")

</div>

I am very new to Powershell. My boss is asking for me to research a code that will download a copy of an excel file and add a current date/time to a saved file. Any help or point in the right direction will be 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:** [July 27, 2022, 4:21pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/2 "2022-07-27T16:21:41Z")

</div>

Jessica,  
Welcome to the forum. 👋🏽

> [@jdavis](#):
>
> My boss is asking for me to research a code that will download a copy of an excel file and add a current date/time to a saved file.

… and instead of following the order of your boss you came here to ask someone else to do it for you?! ☺😉

Please keep in mind - this forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.

We actually expect you to make an own attempt at the first place to get your task done or to solve your problem. If you have done so already please document here what exactly you have done and show your code. Then we probably might be able to help you step further.

In general you are most of the times not the first one with a given task. And code for the most common tasks have been publiched already somewhere. So your first attempt should be to use your favorite search engine to search for examples.

Regardless of all that … you do not share enough precise information about your task. What do you mean with …

> [@jdavis](#):
>
> download a copy of an excel file

? … download from where?

> [@jdavis](#):
>
> an excel file

Is it an \*.XLSX file or a CSV file?

> [@jdavis](#):
>
> add a current date/time to a saved file.

Where would you like to add the date/time? In the file name or in the file content? If in the content - where in the content? In what format should this date/time be?

---

<div class="post-metadata">

**Author:** ![jdavis](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jdavis](https://forums.powershell.org/u/jdavis)\
**Post date:** [July 27, 2022, 4:39pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/3 "2022-07-27T16:39:26Z")

</div>

I’m asking for help or direction on how to find where to start. I watched a couple videos on PowerShell but again I am completely new to this language. My boss is also aware of me not knowing. But thank you I will go somewhere else and try to find help on this. I just figured I would give this forum a chance.

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [July 27, 2022, 6:52pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/4 "2022-07-27T18:52:38Z")

</div>

The amazing people that help on this forum do so on their own time. We are more than happy to help you with any issues with your powershell code. Please post the code your having trouble with. If you haven’t written any code, then understand your next step should be to research the topic and give it a shot. If this is not something you’re interested in doing, then I recommend you advise your boss of this and perhaps suggest he delegate to another staff member or hire someone to perform the requested task. I wish you luck with whichever way you decide. I also want to remind you that if you are welcome to come back seeking help with issues you encounter during this journey.

---

<div class="post-metadata">

**Author:** ![jdavis](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jdavis](https://forums.powershell.org/u/jdavis)\
**Post date:** [July 27, 2022, 7:23pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/5 "2022-07-27T19:23:21Z")

</div>

All I was hoping to get from this forum was somewhere to start looking on how to do this. I was hoping for some starter suggestions for YouTube, Google, Udemy, or Pluralsight. Shoot, saying there was a beginners forum would have been helpful, but I found that on my own. But you just assume that someone just needs a code fed to them or just don’t want to spend the time working on it. SMH. So I appreciate the time it has taken you to type out these responses and wish you luck on issues you encounter during your journey.

---

<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:** [July 27, 2022, 8:04pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/6 "2022-07-27T20:04:16Z")

</div>

> [@jdavis](#):
>
> I watched a couple videos on PowerShell but again I am completely new to this language.

So you already started?! 🤷🏽‍♂️ That’s great. 👍🏽 🙂 You could have told us.

Comming here with a particular task in mind, telling you don’t know PowerShell and asking for help looks like you’re asking someone to do it for you. And that happens often enough here. 😏 And I’m afraid there will no be no source for a beginner especially for this particular task. So you will need to start with learning the very basics of general PowerShell first. 😉 But depending on the specific conditions of your task - you still didn’t reveal BTW - you don’t have to go far to know what it needs. 👍🏽

The more specific you are with your question, the better the answers will be. Here you have some free ressources to start with.

> **[Getting Started with PowerShell 3.0](https://learn.microsoft.com/en-us/shows/getstartedpowershell3/)**
>
> This Jump Start is designed to teach the busy IT Professionals about this powerful management tool. Learn how PowerShell works and how to make PowerShell work for you from the experts Jeffrey Snover, the inventor of PowerShell, together with Jason...

> **[Windows PowerShell 4.0: TFM (The F\*\*\*\*\*\* Manual)](https://www.sapien.com/books_training/Windows-PowerShell-4)**
>
> The most comprehensive and authoritative Windows PowerShell book currently available.

But probably everything you find by yourself is good as well to just get started with. All that counts is to start - it does not matter with what. 😉

Depending on your native language there are other commercial options available. If you don’t mind to have them in english you could start your PowerShell career with a good book like

> **[Learn Windows PowerShell in a Month of Lunches, Third Edition](https://www.manning.com/books/learn-windows-powershell-in-a-month-of-lunches-third-edition)**
>
> Learn Windows PowerShell in a Month of Lunches, Third Edition is an innovative tutorial designed for busy IT professionals. This updated edition covers PowerShell features that run on Windows 7, Windows Server 2008 R2 and later, PowerShell v3 and...

And if you have any question about the code you write in the future you can come back

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [July 27, 2022, 8:56pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/7 "2022-07-27T20:56:25Z")

</div>

I apologize, that’s my mistake. I would start with google, YouTube, Pluralsight, or udemy. All of these are great starting points.

---

<div class="post-metadata">

**Author:** ![DejvDzi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/dejvdzi/32/2460_2.png) [@DejvDzi](https://forums.powershell.org/u/DejvDzi)\
**Post date:** [July 27, 2022, 9:05pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/8 "2022-07-27T21:05:26Z")

</div>

> **[Powershell Tutorial](https://www.tutorialspoint.com/powershell/index.htm)**
>
> Powershell Tutorial, Windows PowerShell is a command-line shell and scripting language designed especially for system administration. Its analogue in Linux is called as Bash Scripti

---

<div class="post-metadata">

**Author:** ![jdavis](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jdavis](https://forums.powershell.org/u/jdavis)\
**Post date:** [July 27, 2022, 9:29pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/9 "2022-07-27T21:29:34Z")

</div>

Thank you, I look forward to looking over the information provided.

To be fair, I said that I was very new, not that I didn’t know any PowerShell. I didn’t put a lot of information into the first task because I am trying to understand the breakdown and how it works which is why I asked for a point in the right direction.

I apologize as well.

---

<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:** [July 27, 2022, 9:45pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/10 "2022-07-27T21:45:07Z")

</div>

> [@jdavis](#):
>
> I didn’t put a lot of information into the first task

But we need to know as specific as possible what your requirements are to recommend someting meaningful. 😉

> [@jdavis](#):
>
> I am trying to understand the breakdown and how it works which is why I asked for a point in the right direction.

You may start with answering some of the questions I asked in my first reply. 😉 Again … the more specific you are with your questions, the better the answers will be.

---

<div class="post-metadata">

**Author:** ![crsty](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@crsty](https://forums.powershell.org/u/crsty)\
**Post date:** [July 31, 2022, 5:19pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/11 "2022-07-31T17:19:26Z")

</div>

Hi, may I ask why do you recommend the third edition and not the fourth?

---

<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:** [July 31, 2022, 6:36pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/12 "2022-07-31T18:36:44Z")

</div>

Cris,  
Welcome to the forum. 👋🏽

> [@crsty](#):
>
> may I ask why do you recommend the third edition and not the fourth?

I assume you’re refering to the “_Getting Started_ …” tutorial … that’s the only well known tutorial they produced and published and the basics are still the same. So for a beginner it doesn’t matter.

BTW: Please do not hijack other peoples threads. Instead create a new one for yourself and place a link to the thread you’re referring to in your own question. 👆🏽

Thanks in advance.

---

<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:17pm UTC](https://forums.powershell.org/t/adding-date-to-a-file/20003/13 "2024-05-16T20:17:41Z")

</div>


