---
title: "Discussion on \"Batch rename files by shell\" | Hashnode"
description: "Discussion on \"Batch rename files by shell\". Today I have a lot of screenshot images need to be rename. Well , it seems to be an easy task, but the space characters inside file names cause a little trouble.\nIf I define a bash function in command line directly, it works well:\ncnf(){\nfiles=$(ls -..."
url: "https://hashnode.com/posts/batch-rename-files-by-shell/60c42fd51e145957d5af7ea0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Batch rename files by shell](https://kenhu.hashnode.dev/batch-rename-files-by-shell?utm_source=hashnode&utm_medium=feed)

Today I have a lot of screenshot images need to be rename. Well , it seems to be an easy task, but the space characters inside file names cause a little trouble. If I define a bash function in command line directly, it works well: cnf(){ files=$(ls -...

Jun 12, 2021 · 1 min read · kenhu.hashnode.dev  
Read the article

-   [#bash](https://hashnode.com/tag/bash)

## Written by

[Ken Hu](https://hashnode.com/@kenhu)

@kenhu · Kaohsiung, Taiwan

  
[View profile](https://hashnode.com/@kenhu)

Software Developer and Product Manager

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
