Imad Ali

Greenhorn
+ Follow
since Jan 04, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Imad Ali

it does print with if statement sorry i got another class mixed up



this is the output (some of it)



$R3QSQ3M
here we are---$R49HV83.txt
$Recycle.Bin
here we are---autoexec.bat




dollar sign + numbers?




15 years ago
Ohh ok, no problem,


well the "if" statement on Lines 50/51


after adding that if statment I got nothing to the terminal window, would it should do is compute the files that make up the two ArrayLists


it should essentially filet out files that are equal in size, but different in hash code value


its like its filtered out everything


or maybe im referecing the arraylist items wrong or theres nothing in the array lists i dont know whats gone wrong, as it all compiles

15 years ago




Above is the much editied code, finally i got the files to print to the terminal window, then i added the much need if statment and nothing to the window again


can some one complie it or till me what the problem is?

15 years ago
and the arrays dont have specifed lengths, they couuld have any amount fo files in them
15 years ago
I think my title explained abit of what I want done!


So Ive got files put into an array



And then I got files put into another array



Then how do I listFiles() the files in both arrays as if they were comming from one folder?
Becasue I want to compute all files from the arrays, to see which ones are the same size in bytes.




I dont know how the mehtod can view the arrays from its scope



15 years ago
i never thought of trying that thanks, yeap I just tred and i cant delete the file while the program is running, hmm ill work on it
15 years ago
yeah i can delete them from Windows
just some more info.

the system.out.println gets its information form an input stream, and there is more than one file to delete
15 years ago
thanls for the reply i tried abosolute path and

when i tried system out println for .exists() it came out truee

so thers something definately there but its not gettin deleted
15 years ago
My code:
---------------------------------------------------------
String deleteString = e.getPath();
File deleteListFile = new File(deleteString);

deleteListFile.delete();
-------------------------------------------------------------

so to talk you through it, the File object is obtained by the results by system.out.println (not shown here)

...and then I am getting the path of the file by using getpath()

then i want that file path and its file deleted, but wen i go check in that folder its not deleted.

The list of files mathcing the criteria are listed correctly because they get displayed, just not deleted..

Help??
15 years ago
Hello help me please

I want to include a terminal window in an exectuable jar file??

Outside the IDE, I can only access my program by command promt, Im not fussed about layout, I just need what appears in the command promt window to be in a terminal window in a jar file.

Any help or examples of what im trying to do pleaseee

thankyouuu for readinggg
15 years ago
oh yes why has Map been used asa pose to HashMap or TreeMap?
16 years ago
hmm cant find a thanks or rep button but thanks for all that im working on implementing it now, just abit more looking into some methods and i should hopefully have it done, thanks again
16 years ago
so just to add more detail because theyre may be confusion

Im basically trying to get files with equal file size first, then im trying to put those in an array, then the files in the array need to be compared possibily by length (bytes) (not file names but files contents), the comparison need to be made maybe by binary contents or by generating an MD checksum which ever ones easier.
16 years ago
rob I dont think that other code you provided was doing what I wanted

I am really really appreciative of if though!
16 years ago
hello rob and everyone Ive had no success in getting files of the same size

Please may someone help me to get files of the same size listed on screen or put into an array (both if possible).

Heres what ive tried so far, (also take a look at the commented out code)



please please help..
16 years ago