Article 5QYJM bash script generates error "No such file or directory".

bash script generates error "No such file or directory".

by
nelson1387
from LinuxQuestions.org on (#5QYJM)
Hello:

I have a script that renames files in the current directory.

#!/bin/bash

mv file01.jpg newfile01.jpg
mv file02.jpg newfile02.jpg
.
.
.
mv filenn.jpg newfilenn.jpg

When I run the mv command from terminal, the command works. When I run a script, it comes back with No such file or directory. When I execute from Finder the error is No such file or directory for each command. Have I missed a step in creating the script?latest?d=yIl2AUoC8zA latest?i=I-MI4CUhRR8:RC23l_MZX3g:F7zBnMy latest?i=I-MI4CUhRR8:RC23l_MZX3g:V_sGLiP latest?d=qj6IDK7rITs latest?i=I-MI4CUhRR8:RC23l_MZX3g:gIN9vFwI-MI4CUhRR8
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments