text: import os
  import shutil
  from typing import List
  
  def create_directories(root_dir_path:str, classes:List) -> None:
      if not os.path.isdir(root_dir_path):
          os.mkdir(root_dir_path)
  
      for direc in classes:
          path = os.path.join(root_dir_path,direc)
          if not os.path.isdir(path):
              os.mkdir(path)
  
      print('create_directories done')
  
  
  def check_file_type(file_path:str, file_type:str='.tdms') -> bool:
      """[check file's ext, see if match with file_type parameter]
  
      :param file_path: [file path or file name]
      :type file_path: [str]
      :param file_type: [str], defaults to '.tdms'
      :type file_type: str, optional
      :return: [return true if matchs, false if not matched]
      :rtype: bool
      """
      _ , file_extension = os.path.splitext(file_path)
      if file_extension == file_type:
          return True
      else:
          return False
  
  def movefiles_loop_files_only(source_path:str, destination_root_path:str,file_type:str ='.tdms', found:bool = False) -> None:
      print(f'source_path is {source_path}')
      filelist = os.listdir(source_path) 
      for file in filelist:
          print(file)
          # get wave file / folder path
          filepath = os.path.join(source_path, file)  
          # check if it's a folder or not            
          if(os.path.isdir(filepath)):              
              # If it is a folder, call the method itself recursively to check its child items 
              print(f'Enter folder: {filepath}')
              found = movefiles_loop_files_only(filepath,destination_root_path,file_type,found=False)          
  
          else:
              # If it is a file, do the match using regular expression
              file = file.rstrip(file_type)
              print(f'searching filename: {file}')
              if check_file_type(filepath, file_type=file_type):
                      
                  destination_dir = os.path.join(destination_root_path)
                  try:
                      shutil.move(filepath, destination_dir)
                  except Exception as e:
                      print(e)
                  else:
                      print(file,'\n\t\t->',destination_dir)
                      found=True
                  continue
              else:
                  continue
              
      print('move files FINISHED')
      return found
  
  