I have got a sftp script that downloads the archives , unzip it and then rename the files according to date and moves it to respective folder.

I had to move the script from USB drive onto a separate server . After i moved whenever the script runs it extracts the files but while moving files it gives following error :

mkdir: cannot create directory `../abc/2011-11-23': No such file or directory

Any help will be appreciated.

Thanks

link|improve this question

20% accept rate
Is the 'directory' you are currently in happen to be a symlink to somewhere else? – Zoredache Dec 2 '11 at 5:35
feedback

2 Answers

It looks like the abc folder doesn't exist. You probably want to use -p option to make parent directories as needed:

$ mkdir -p ../abc/2011-11-23
link|improve this answer
thats what confusing me as /abc folder is already there, but i am still going try this – San Dec 2 '11 at 5:19
feedback

Either there is no '../' or there is no '../abc/'

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.