generates the following error when previous slicesdir_multi exists:
mv: cannot move ‘connectom/A/slicesdir’ to ‘connectom/A/slicesdir_multi/slicesdir’: File exists
The reason being, mv does not copy the content of slicesdir, rather moves the slicesdir folder to slicesdir_multi. If previous output exists, then mv fails. See the following simple example:
[tb571@pnl-z840-2 A]$ mkdir top
[tb571@pnl-z840-2 A]$ mkdir top/top-1
[tb571@pnl-z840-2 A]$ touch top/top-1/abc.txt
[tb571@pnl-z840-2 A]$ tree top
top
└── top-1
└── abc.txt
[tb571@pnl-z840-2 A]$ mkdir top-1
[tb571@pnl-z840-2 A]$ touch top-1/abc.txt
[tb571@pnl-z840-2 A]$ tree top
top-1
└── abc.txt
[tb571@pnl-z840-2 A]$ mv top-1 top
mv: cannot move ‘top-1/’ to ‘top/top-1’: File exists
Hi @SenthilCaesar , https://github.com/pnlbwh/CNN-Diffusion-MRIBrain-Segmentation/blob/remove-ext-dep/pipeline/dwi_masking.py#L516
generates the following error when previous
slicesdir_multi
exists:The reason being,
mv
does not copy the content ofslicesdir
, rather moves theslicesdir
folder toslicesdir_multi
. If previous output exists, then mv fails. See the following simple example:I shall give you a solution for this.