Tuesday 12 November 2019

Versioning files in Windows XP


I would like to set up an archive folder in Windows XP that would allow me to drop several different versions of the same file, and have it store each version. I would envision this to work similar to the recycle bin, where you can drop the same file 10 times and it stores each version. Anybody know how I can do this?


Thanks!


Edit: Using a Version Control System is complete overkill for this situation. I may just write a script that appends a date/time stamp to the file when added to the folder.



Answer



This batch file copy your file(s) to "_bpath" (set it as you like) and add actual date, hours, minutes and seconds to it.


@echo off
Set _bpath=T:\Temp\
if [%1]==[] goto :eof
:loop
Set _file=%~n1%
Set _ext=%~x1%
For /f "tokens=1-3 delims=1234567890 " %%a in ("%time%") Do Set "delims=%%a%%b%%c"
For /f "tokens=1-4 delims=%delims%" %%G in ("%time%") Do (
Set _hh=%%G
Set _min=%%H
Set _ss=%%I
Set _ms=%%J
)
copy %1 "%_bpath%%_file%(%date:/=-% %_hh%h%_min%m%_ss%s)%_ext%"
shift
if not [%1]==[] goto loop

For convenience you could add this batch file to your "Send To" right click menu by copying it in %APPDATA%\Microsoft\Windows\SendTo


Or if you need more advanced features, a software that imitate the mac osx time machine, like Comodo Time Machine (free) or Genie Timeline (35$), could be a good choice.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...