Diff - filename and directory name are same

Hi,

I have in the one folder file and directory that have same name. I need make diff from first directory where exists file in folder FOLDER/filename and second file where not exist folder, but FOLDER is filename. I use -N switch for create new file. Scripts report: Not a directory

Sample:

diff -u -N a/FOLDER/filename b/FOLDER/filename 

in a: filename is in the FOLDER
in b: directory FOLDER not exist, but exists file with name FOLDER

How I can remove this problem ?

I don' t think you can have in the same path a file and a directory with the same name. Capital letters? Spaces/white characters? Please cd to the directory where they are, and post output of

ls -il 

and

ls *  -d | tr ' |\t' '+'

to look at the file/dir closer. The second command will display the dir/filenames with space or tab replaced with '+'.

Aha, I just learned -F option of ls. this can solve your problem.
assume you have directories a and b.
do this:

cd a/ && find ./ |xargs ls -Fd >/tmp/dirA
cd b/ && find ./ |xargs ls -Fd >/tmp/dirB

then, you may want to sort the two file and diff.