Finding size of files with spaces in their file names

I am running a UNIX script to get unused files and their sizes from the server. The issue is arising due to the spaces present in the filename/folder names.Due to this the du -k command doesn't work properly.But I need to calculate the size of all files including the ones which have spaces in them.
I have a problem with this part:

for file in `find . -type f -print | cut -c 3- | sed 's/ /#}/g'` //my file name here would be UK#}dump/a.jpg

do

    file2=`echo $file | sed 's/#}/ /g'`                                          //my file name here would be UK dump/a.jpg . If I run a du -k command for this filename I will get an error
    file3=`echo $file | sed 's/#}/\\\ /g'`                                   // this line is my attempt to change the filename to UK\ dump/a.jpg but it does not happen
    size=`du -k $file3 |awk '{print $1}'`

    result=`grep -c "$file2" $dbdump`
  .........................
  done
   

I have tried the following ways:

1) sed 's/#}/\ /g'`                                   

  2) sed 's/#}/\\ /g'`                                   
  3) sed 's/#}/\\\ /g'`       
  4) sed 's/#}/\\\\ /g'`    

   

Some of it works on the command line but doesn't work when I run them as a script.

I cannot use ls -ltr because I dont want the sizes of all files in a folder. I need to get each file in a set of folders, loop through each of them, do some comparison and then write them to a file along with their size.So Could you'll please help me with the same.

Thanks and Regards,
Neil

du -k "${fileName}"

Hi

I did try that but it gives me an error.

Example. I use USA a/Neil.jpg

Then I get an error saying USA file directory Not found

Could you please help me with why this is hahappening

Thanks
Neil

Did you try it exactly like I suggested?
Please show what you've tried.

How about using find 's printf action avoiding du entirely:

find . -printf "%p %s\n"

Works for find (GNU findutils) 4.4.2