Solved

how to replace file

Posted on 2013-01-22
5
256 Views
Last Modified: 2013-01-28
Hi Experts,

Is there any way to replace a file in a windows folder without changing the modified date ?
any command line option while overwrite an existing file but do not modify the date, remain as previous date.
Propmt response would be highly appreciated.

Thanks
0
Comment
Question by:alam747
5 Comments
 
LVL 25

Accepted Solution

by:
Tony Giangreco earned 500 total points
ID: 38808394
The only way I know is to change the system clock & date back to just before the date on that file and make your change at the exact time already on the file.
0
 
LVL 1

Expert Comment

by:alatechsolutions
ID: 38808471
robocopy comes to mind. Not fully sure what your goal is or the scenario where you would need such a feature. If you give us a better understanding of what you are trying to accomplish with this, maybe there is another way?

look at the /copy:<copy flags> of robocopy here: http://technet.microsoft.com/en-us/library/cc733145(v=ws.10).aspx

very powerful command line tool... Let us know how it goes
0
 
LVL 2

Expert Comment

by:browningit
ID: 38808535
What comes to mind for me is a java command that can edit the final result, but I would only suggest this as a last stance and "don't be evil" connotation to it.

It allows you to re-date any file in a Windows OS.

Again, this is traceable with any expert.  But if you are looking to make it seem like you submitted your paper on time to the prof.?  I completely understand ;)

Don't be evil.

**apparently the attachment option doesn't allow me to put it here, so PM me for a link to the file**
0
 
LVL 25

Expert Comment

by:Tony Giangreco
ID: 38812846
Have you tried one of these solutions?
0
 

Author Closing Comment

by:alam747
ID: 38829567
thanks
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question