Reputation:
I want to access folders shared to me on drive, I have created a shortcut on my drive and I wanna access it from there. The problem I'm facing is I want to change directory using variable. But when I use this code:
for boxNo in range(109):
boxStr = "/gdrive/My Drive/Box Set {}".format(boxNo)
%cd -q setStr # The problem is here
url = !pwd
print("I have to use this url: " + url[0])
I get this error:
[Errno 0] No such file or directory: 'setStr'
SIDE-NOTE:
echo
or!echo
both don't work either as I writeecho url[0]
it displaysurl[0]
on the output. But inside parenthesis, as in print,print(url[0])
, it works. My guess is if I could change directory keeping the variable inside parenthesis it would work but I seem to find no way of doing so.
Upvotes: 2
Views: 1026