VBA to move file or folder in Google drive Office

VBA to move file or folder in Google drive Office This one is to move the file so for example let's say that we want to move this file we want to move this file from uh this file is currently.

In expense data and let's say we want to move it to documents folder which is playing at the moment you can use this as well so start drive service disconnect using.

The address service uh called the move object method and then um this is a target folder id so this is where we're gonna move it okay.

So let's try this move this one is moving by id okay f5 and if you come here you'll see that it has moved that file.

From here okay now you can also move the file you know using the query there are uh you know like lots of query options which i'll.

Share more examples as well as the link where you can uh use as a reference uh for example in this one we're saying that uh the queries name is equal to this.

VBA to move file or folder in Google drive

File and then uh you can specify where you want to move it so for example if i go to others folder and let's say that.

I want to use this particular file i want to search for this file where the name is equal to this and then you can move it to the documents folder again drive service move object.

Get file by disk here you have to specify query whereas this one is id and then uh you can specify the query you are running and then the target okay i'm gonna run this f5.

It says move successfully found one file so if there's more files gonna tell you that you cannot move because there are more files with the same name.

Previous Post Next Post