BATCH: file date comparison + deletion ??

LezardMoo Posted messages 614 Status Membre -  
dubcek Posted messages 18702 Registration date   Status Contributeur Last intervention   -
Good evening everyone!!

So I am currently coding a small batch for file backup.

I would like to compare several archives (containing the same files but modified, they are source code backups) and delete archives older than 2 months.

On Linux, a simple:

find /path -mtime +60 -print | xargs rm -f

and it's done... but not on Windows... apparently the find command is only used to search for strings.

How to do the equivalent on Windows?? any hints??

Thanks in advance ;)

Configuration: Windows 7 / Firefox 15.0.1

3 réponses

dubcek Posted messages 18702 Registration date   Status Contributeur Last intervention   5 657
 
hello
download the Unix find for Windows (as well as lots of other commands) here: https://sourceforge.net/projects/unxutils/files/unxutils/current/
look in /usr/local/wbin
no installation, they're just .exe files
0
LezardMoo Posted messages 614 Status Membre 14
 
hi !! thanks for the help but I've already installed cygwin on the work machine (Windows) and personally I only work under Linux ^^ so I can't do without these commands :):)

unfortunately right now it's not possible because the script I'm making is for other people, it's not a personal script, it's for work so I would have preferred to use only DOS commands.
0
dubcek Posted messages 18702 Registration date   Status Contributeur Last intervention   5 657
 
0