Question

I have a dataset which has around 10,000 emails which are in txt format. The dataset has around 4k fraudulent emails and 6k non-fraudulent emails. I am using Lucene to cluster this (Fraudulent and non-fraudulent).

For example, For input query search = "spam", I get around 600 files matching the string. My problem here is, I want to copy or export the result files to another folder. This is my output when I give the search string="spam"

File name: C:\21 march\data\6724.txt Score: 0.24614158
File name: C:\21 march\data\6308.txt Score: 0.24614158
File name: C:\21 march\data\375.txt Score: 0.19691327
File name: C:\21 march\data\4630.txt Score: 0.14768496
Found 600

I want to export or copy these files from this location to another location - say C:\Answer\data\62724.txt. Is it possible to copy these clustered files to another folder?

Was it helpful?

Solution

Where is the question?

You are in Java. Java has functions to copy files.

Read the tutorial on essential file I/O (file copying), then copy the files you want into your output folder.

http://docs.oracle.com/javase/tutorial/essential/io/copy.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top