Skip to content

Instantly share code, notes, and snippets.

@MrNegativeTW
Last active March 30, 2025 14:26
Show Gist options
  • Select an option

  • Save MrNegativeTW/2f036c61773e38c3dcb19509cf9c4cdf to your computer and use it in GitHub Desktop.

Select an option

Save MrNegativeTW/2f036c61773e38c3dcb19509cf9c4cdf to your computer and use it in GitHub Desktop.
快速取得資料夾內所有檔案的詳細資料

快速取得資料夾中所有檔案的詳細資訊,加速作業進行,例如:

  • 快速比對素材
  • 於兩台電腦中比對檔案清單是否相同 ...等
ls -al > fileInfo.txt
mv ~/fileInfo.txt ~/Desktop/fileInfo.txt
#!/bin/bash
cd "$(dirname "$BASH_SOURCE")" || {
echo "Error getting script directory" >&2
exit 1
}
ls -al > fileInfo.txt
mv fileInfo.txt ~/Desktop/fileInfo.txt
@echo off
dir /s >fileInfo.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment