filesystemobject.movefolder? [英] filesystemobject.movefolder?

查看:54
本文介绍了filesystemobject.movefolder?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么这么难做到。我有很多书都有如何做这些事情,但当我尝试他们从未工作的exaples时,我有一个关于复制文件的帖子。其他一些人帮助这个,我试图用movefile做同样的事情。但它从来没有工作,因为你可以看到filesystemobject对我来说很难实现,因为这个Movefolder事件属于这个类别我在这里用于copyfolder事件的代码:

展开 | 选择 | Wrap | 行号

解决方案

不确定这只是一个未命中类型,但你没有在尝试使用它之前分配fldr变量


你的代码 -

展开 | 选择 | 换行 | 行号


< blockquote>它也有帮助,如果你发布你收到的任何错误,在这种情况下,我希望看到 -


''警告1变量''fldr''在它有之前使用被分配了一个值。在运行时可能会产生空引用异常。


我不确定具体的术语,但是fso只是指向filesystemobject的指针,然后你使用getfolder将一个特定的文件夹分配给fldr,一旦fldr指向一个文件夹就可以使用该功能移动它。


嘿那里,好吧这是我的错过类型,我得到了如此沮丧地做了很多方式,我忘了把它改回fldr我得到的错误是Permssion Denied并且它一直指向代码的这一部分:

展开 | 选择 | Wrap | 行号


why is this so hard to do. i have alot of books that have exaples of how to do these things but when i try the exaples they never work i have a previous post on "copying files" some of the other guys help on this one and i tried to do the same thing with the "movefile" but it never worked as you can see the "filesystemobject" is hard to accomplish for me because this "Movefolder" event falls in this category the code i have i have used for the copyfolder event right here:

Expand|Select|Wrap|Line Numbers

解决方案

not sure if this was just a miss type but you are not assigning the fldr variable before trying to use it

your code -

Expand|Select|Wrap|Line Numbers


it also helps if you post any errors you receive as in this case I would have expected to see -

'' Warning 1 Variable ''fldr'' is used before it has been assigned a value. A null reference exception could result at runtime.


I''m not to sure of the exact terms but fso is just a pointer to the filesystemobject and you then use getfolder to assign a specific folder to fldr , once fldr is pointed at a folder you can user the function to move it.


hey there, ok it was a miss type on my part, i got so fustrated doing it so many ways that i forgot to change it back to "fldr" and the error I''m getting is "Permssion Denied" and it keeps pointing to this part of the code:

Expand|Select|Wrap|Line Numbers


这篇关于filesystemobject.movefolder?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆