Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Comparison for existance of duplicate files in folder in MATLAB?

Status
Not open for further replies.

ganesh449

Junior Member level 1
Joined
Nov 30, 2010
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,417
Hi friends,
In my MATLAB project i have a scenario,in which i have to extract the features of an image and store all the files with a specified name in a folder.Now my issue is how can i know the existence of file name already in that folder.I need a MATLAB code for the comparison of file names in the folder.

My scenario:
I have a folder named Test.
i have files named Test1.mat,Test2.mat,Test3.mat,Test4.mat,Test5.mat
Now when ever i give the file name Test1.mat it has to show that file name already exists..



Thanks,
RVL.Ganesh.
 

ninju

Full Member level 3
Joined
May 14, 2011
Messages
189
Helped
49
Reputation
98
Reaction score
48
Trophy points
1,308
Activity points
2,398
cd 'required directory';
var_1=dir;

% var_1 will be a structure, i don't remember exactly the fields. But amongst them, there's a field called name. use this info and strcmp.
 

ganesh449

Junior Member level 1
Joined
Nov 30, 2010
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,417
I am very much thankful for your reply ninju...I worked it out successfully...

Regards,
RVL.GANESH
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top