You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See below. Not sure why I have to use specific directories. Isn't your code suppose to work on any give directory ?
var result = findRemoveSync('c:\Temp', {test: true});
console.log(result);
var result = findRemoveSync('C:\Users\IrekRomaniuk\AppData\Local\Temp', {test: true});
console.log(result);
Here it is:
D:\ftproot\nodejs>more repstat2.js
var findRemoveSync = require('find-remove');
var result = findRemoveSync('D:\ftproot\mds_backup2', {test: true, age: {seconds
: 172800},extensions: '.txt'});
console.log(result);
D:\ftproot\nodejs>node repstat2.js
[]
D:\ftproot\nodejs>dir d:\ftproot\mds_backup2*.txt
Volume in drive D is Data
Volume Serial Number is 104C-9C39
Activity
binarykitchen commentedon Jul 15, 2015
Haven't tested with Windows yet. But could you try this and and paste the output here?
If you use a newer Window version, probably try using this path instead:
C:\Users\User Name\AppData\Local\Temp (%USERPROFILE%\AppData\Local\Temp)Not sure here. Maybe some work is needed here to make find-remove truly Windows-compatible.
irom77 commentedon Jul 16, 2015
See below. Not sure why I have to use specific directories. Isn't your code suppose to work on any give directory ?
and the output is :
irom77 commentedon Jul 16, 2015
oh sorry, I just noticed it works fine on windows..what was not working is age.seconds argument, doesn't remove files
binarykitchen commentedon Jul 17, 2015
@irom77 have you verified the age of these jpg files? you sure they older than one hour?
irom77 commentedon Jul 17, 2015
See below
binarykitchen commentedon Jul 20, 2015
both
findRemoveSync()calls do not have the same parameters, hence you cannot compare like that.try this:
and share the output here altogether with the contents of that directory. then we can start investigating the problem.
(be careful, if you do a
findRemoveSync('D:\ftproot\mds_backup2');it will delete everything in it)irom77 commentedon Jul 30, 2015
Here it is:
D:\ftproot\nodejs>more repstat2.js
var findRemoveSync = require('find-remove');
var result = findRemoveSync('D:\ftproot\mds_backup2', {test: true, age: {seconds
: 172800},extensions: '.txt'});
console.log(result);
D:\ftproot\nodejs>node repstat2.js
[]
D:\ftproot\nodejs>dir d:\ftproot\mds_backup2*.txt
Volume in drive D is Data
Volume Serial Number is 104C-9C39
Directory of d:\ftproot\mds_backup2
04/20/2015 07:36 AM 67,402 kernel_debug-MAR-VSX-015.txt
12/16/2013 09:50 AM 11,019,808 kernel_debug2.txt
07/17/2015 11:51 AM 0 new.txt
07/17/2015 12:32 PM 0 new2.txt
12/06/2014 04:00 PM 27,696 pinglist-all.txt
11/22/2014 05:45 PM 12,585 pinglist-MAL-up.txt
11/23/2014 03:49 PM 12,447 pinglist-MAL2-up.txt
11/23/2014 04:43 PM 12,487 pinglist-MAL3-up.txt
11/22/2014 05:56 PM 3,399 pinglist-WAL-down.txt
06/08/2015 02:36 PM 290,426 rep-ike.txt
06/15/2015 03:15 PM 110,825 rep-lsm.txt
09/17/2011 06:26 AM 3,506,759 tcpdumpexternal.txt
01/24/2014 11:30 PM 84,057 tunneldrop.txt
03/19/2015 11:23 AM 13,167 WAL-NEW-VSX-01.txt
03/19/2015 12:27 PM 13,167 WAL-NEW-VSX-02.txt
15 File(s) 15,174,225 bytes
0 Dir(s) 26,770,358,272 bytes free
D:\ftproot\nodejs>
binarykitchen commentedon Jul 31, 2015
Right, that's evidence that something is wrong.
It's unfortunate that I have no Windows machine here to reproduce and fix this.
If I were you, I would add some
console.log(...)lines in the source code and try again. For example here, inside the importantisOlder()function:https://github.com/binarykitchen/find-remove/blob/master/find-remove.js#L126
add
console.log('isOlder:', path, ctime, ageSeconds, now)When the path for the file
kernel_debug2.txtappears, paste the console output here.