How to copy the file without changing the update date and time

I want to copy a file without changing the update date and time using bigfix.
But I found that using “COPY” or “MOVE” command change the the update date and time of the file.
Please tell me if you know the solution.

-Sample Task
download http://xx.xx.xx.xx:52311/aaa.txt
copy “__Download/aaa.txt” “{pathname of parent folder of regapp “BESClient.exe”}\aaa.txt”

download http://xx.xx.xx.xx:52311/aaa.txt
move “__Download/aaa.txt” “{pathname of parent folder of regapp “BESClient.exe”}\aaa.txt”

Are you saying that “{pathname of parent folder of regapp “BESClient.exe”}\aaa.txt” has a different timestamp to “__Download/aaa.txt” or are you saying that “__Download/aaa.txt” has a different timestamp to http://xx.xx.xx.xx:52311/aaa.txt

When your file is copyed into the cache directory of the BigFix server (or of the relay) it is timestamped with current date and time. So regardless of the original timestamp you will not retain it.
The workaround may be

  • to zip/tar the file
  • download the zip file
  • unpack it.

Thank you for your response.
You are correct.

Thank you for your reply.
I understand your idea.
But I don’t know how to unzip the zip file using bigfix.
Please tell me if you know the way.

I’ve used two different methods to unzip.

  1. Use the unzip utility provided by BigFix:

prefetch unzip.exe sha1:e1652b058195db3f5f754b7ab430652ae04a50b8 size:167936 http://software.bigfix.com/download/redist/unzip-5.52.exe

waithidden __Download\unzip.exe -o “{pathname of client folder of current site}__Download\myzipfile.zip” -d "C:\destinationfolder"

  1. I also have 7zip installed on most of my endpoints so I can do this:

waithidden “C:\Program Files\7-Zip\7z.exe” x “{pathname of client folder of current site}__Download\myzipfile.zip” -o"c:\destinationfolder"

1 Like