I recently installed Anaconda so Jupyter notebook is up-to-date and all (I think).
BUT despite that, it seems like the magic function %mv is missing. Indeed, if I type %lsmagic in my notebook, the %mv is missing from the list I obtain.
Any idea how to install it?
I could of course move the files from Cygwin, but I think it’s better for later to have everything working in a single notebook…
%mv isn’t actually a magic - there’s some config that lets you use % instead of ! in certain cases. A bit of googling didn’t find what that config is, and I can’t recall the details - so unless you manage to find it, or someone else here tells us what it is, you’ll need to use !mv instead of %mv for now.
I just started this course…apologies I found out about this late.
In case there are those who are like me who can’t get %mv working at all, here’s another solution and its using shutil.move.
import glob, os, shutil
files = glob.iglob(os.path.join("%YOUR_PATH%\sample\train\", “cat.*.jpg”))
for file in files:
if os.path.isfile(file):
shutil.move(file, “%YOUR_PATH%\sample\train\cats\”)