# How to rename a file name with timestamp before uploading in a request?

**URL:** <https://community.postman.com/t/how-to-rename-a-file-name-with-timestamp-before-uploading-in-a-request/23718>\
**Category:** Help Hub\
**Created:** [May 13, 2021, 5:48pm UTC](https://community.postman.com/t/how-to-rename-a-file-name-with-timestamp-before-uploading-in-a-request/23718 "2021-05-13T17:48:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ps198478320](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@ps198478320](https://community.postman.com/u/ps198478320)\
**Post date:** [May 13, 2021, 5:48pm UTC](https://community.postman.com/t/how-to-rename-a-file-name-with-timestamp-before-uploading-in-a-request/23718/1 "2021-05-13T17:48:13Z")

</div>

Hi,  
i have a request where i have to send a file from a folder.  
It works but i want to rename the file name by adding timestamp.  
Is it possible to do it with postman?  
Thank you

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [May 14, 2021, 4:09pm UTC](https://community.postman.com/t/how-to-rename-a-file-name-with-timestamp-before-uploading-in-a-request/23718/2 "2021-05-14T16:09:52Z")

</div>

Hey @ps198478320

You might need to expand on this details here as it’s a little difficult to know what you’re trying to do.

Would you be able to provide an example please?

---

<div class="post-metadata">

**Author:** ![ps198478320](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@ps198478320](https://community.postman.com/u/ps198478320)\
**Post date:** [May 14, 2021, 5:51pm UTC](https://community.postman.com/t/how-to-rename-a-file-name-with-timestamp-before-uploading-in-a-request/23718/3 "2021-05-14T17:51:27Z")

</div>

Ok i have a request with POST method,  
In the body of the request there is a parameter to upload a file.  
So i want to know if it"s possible to rename the file before uploading in the request.

i tried this in Pre-request Script

> var fso= new ActiveXobject(“Scripting.FileSystemObject”)  
> fos.MoveFile(“c:\temp\file.xlsx”, “c:\temp\filerenamed.xlsx”)

It returned:  
ActiveXObject is not defined

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [December 12, 2024, 12:57pm UTC](https://community.postman.com/t/how-to-rename-a-file-name-with-timestamp-before-uploading-in-a-request/23718/4 "2024-12-12T12:57:18Z")

</div>

Closed on December 12, 2024, 12:57pm UTC

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