I added an error when the target file name doesn't exist after the rename is done. This file is in a directory without write permission to me. I also don't have permission to write to the file (i.e. cannot delete):
Renaming [291_DG3-read-4.fastqsanger] to [DG3-read-4.fastqsanger].
ERROR:/Genomics/grid/users/rleach/pub/filetools/rename.pl:LINE192: Unable to rename [291_DG3-read-4.fastqsanger]. No such file or directory
Before I added that code, the script was telling me it was successfully renaming that fiule (and all the other files).
E.g.
cp 202_DG1-read-3.fastqsanger DG1-read-3.fastqsanger
cp: cannot create regular file `DG1-read-3.fastqsanger': Permission denied
I added an error when the target file name doesn't exist after the rename is done. This file is in a directory without write permission to me. I also don't have permission to write to the file (i.e. cannot delete):
Before I added that code, the script was telling me it was successfully renaming that fiule (and all the other files).
E.g.