# Creating a filename with the current date

**URL:** <https://forums.powershell.org/t/creating-a-filename-with-the-current-date/19800>\
**Category:** PowerShell Help\
**Created:** [July 5, 2022, 6:04pm UTC](https://forums.powershell.org/t/creating-a-filename-with-the-current-date/19800 "2022-07-05T18:04:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![banatello](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@banatello](https://forums.powershell.org/u/banatello)\
**Post date:** [July 5, 2022, 6:04pm UTC](https://forums.powershell.org/t/creating-a-filename-with-the-current-date/19800/1 "2022-07-05T18:04:37Z")

</div>

Hello,

I’m new to using power shell, and trying to do any scripting in it. I have 2 questions.

1. Where can I find a good primer on doing scripting in power shell, and where can I locate a command list for power shell that would be good for a beginner.

2. I would like to use the Compress-Archive command, and for the name creation have it pull the system date when the file was being created and add it to the file name (ex: test\_file 07052022).

Thanks for any help.

---

<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 5, 2022, 6:49pm UTC](https://forums.powershell.org/t/creating-a-filename-with-the-current-date/19800/2 "2022-07-05T18:49:01Z")

</div>

Hi,

1. Mostly google, [Powershell Tutorial](https://www.tutorialspoint.com/powershell/index.htm)
2. e.g [Timestamp on file name using PowerShell - Stack Overflow](https://stackoverflow.com/questions/1954203/timestamp-on-file-name-using-powershell)

---

<div class="post-metadata">

**Author:** ![banatello](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@banatello](https://forums.powershell.org/u/banatello)\
**Post date:** [July 5, 2022, 7:16pm UTC](https://forums.powershell.org/t/creating-a-filename-with-the-current-date/19800/3 "2022-07-05T19:16:26Z")

</div>

Thank you for the answers. I’ve been using google, but since I’ve pretty much yesterday started looking a lot still doesn’t make sense yet. I’m guessing things will make more sense as I use it more.

The time stamp is exactly what I was looking for, thank you again.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [February 10, 2024, 5:34pm UTC](https://forums.powershell.org/t/creating-a-filename-with-the-current-date/19800/4 "2024-02-10T17:34:08Z")

</div>

Closed on February 10, 2024, 5:34pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
