Hi, I've been working with the Python APIs to develop a file system.
My problems occur when I try to move a file into the 'root directory'.
Essentially when I moved a file out of a folder, it would erase the
file instead of simply putting it under the "Items not in folders"
category.

Also, when moving a file out of a folder and into another folder, it
simply puts it into both folders. Simply moving a file into a folder
works as it should.

I've written some test code to try and figure out how to correctly do
this to try and simplify the steps needed to then be able to adapt it
back into the main code base.

Below is the test code I wrote. The folder I am moving the file into
is tfol:

--------
gd = gdata.docs.service.DocsService()
gd.email = em
gd.password = pw
gd.ProgrammaticLogin()

q = gdata.docs.service.DocumentQuery(categories=['folder'], params=
{'showfolders': 'true'})
feed = gd.Query(q.ToUri())

for f in feed.entry:
        if f.title.text == 'tfol':
                eto = f

feed = gd.GetDocumentListFeed()
entry = feed.entry[0]

gd.MoveOutOfFolder(entry)
gd.MoveDocumentIntoFolder(entry, eto)    ## Commenting this out causes
the file referred to by entry
 
## to be erased
--------

Your help would be massively appreciated.
Thanks,
Scott W
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to