code: def mv_videos(path):
      
      count = 0
      for f in os.listdir(path):
          f = os.path.join(path, f)
          if os.path.isdir(f):
              for sf in os.listdir(f):
                  sf = os.path.join(f, sf)
                  if os.path.isfile(sf):
                      new_name = os.path.join(path, os.path.basename(sf))
                      try:
                          os.rename(sf, new_name)
                      except (WindowsError, OSError) as e:
                          print('mv {} happens error: {}'.format(sf, e))
                      else:
                          count += 1
                          print('mv {} to {}'.format(sf, new_name))
      return count
docs: move videos in sub-directory of path to path.