Forums

moving folders

Hi, I just created my 2nd webapp, which is very similar to my first. I followed the instructions on PythonAnywhere help and cloning my github environment and creating my environment all seemed to go well. Unfortunately it seemed to add a couple levels of folders below my code layer. I would like to move the code layer folder down two levels. How would I do that? Thanks! Howard

use the mv command to move the files? or start over again but start two levels up?

Hi, I actually tried your 2nd suggestion of starting all over again at two levels down. This time it created one extra layer, however, I think maybe their is some intelligence there as if it created it at the level I wanted, their would be two .git folders, one for each application and that can't happen. I think it will work the way it is so I'm going to leave it as is for now. Thanks for your help! Btw, would mv work on folders? If not, too many levels of folders and way to many files to use that. Thanks again!

Hi, @hfreedman1957 -- yes, mv works on directories. You can always check <command> --help or man <command> (here: mv --help) to learn more about a new command on Linux.

I tried to use the mv command to move a directory but it keeps saying the directory I want to move it to doesn't exist - what is the syntax for moving a directory with mv in pythonanywhere?

If you use something like:

mv /the/source/directory /the/destination/directory/name

and /the/destination/directory/name does not exist, then you will get that error. Make sure the directory you're trying to move it to exists.

This mv syntax in BASH does not work for moving directory or file. This is what I did: 15:51 ~ $ mv /blogsite/changing /blogsite/destination mv: cannot stat '/blogsite/changing': No such file or directory 15:58 ~ $ cd blogsite 15:59 ~/blogsite $ mv /blogsite/changing /blogsite/destination mv: cannot stat '/blogsite/changing': No such file or directory 15:59 ~/blogsite $ mv /blogsite/changing/ /blogsite/destination/ mv: cannot stat '/blogsite/changing/': No such file or directory 15:59 ~/blogsite $ mv /changing/ /destination/ mv: cannot stat '/changing/': No such file or directory As you can see I keep getting no such file or directory. Is there a way that I can move file in Pythonanywhere?

Never mind I found my answer.

Glad to hear that!