将所有文件移动到另一个目录 [英] Moving All Files To Another Directory

查看:140
本文介绍了将所有文件移动到另一个目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以将一个文件从一个目录移动到另一个目录.

I can move one file from one directory to another.

rename("c:\\PASS\\airport.zip", "c:\\Users\\DS\\Downloads\\airport.zip");



但是,如何将目录中的任何文件移动到另一个文件.我尝试过了,但不起作用.



But how do I move whatever file(s) is in a directory to another. I tried this and it doesn''t work.

rename("c:\\PASS\\*.*", "c:\\Users\\DS\\Downloads\\*.*");

推荐答案

使用:
rename("c:\\PASS", "c:\\Users\\DS\\Downloads");


这篇关于将所有文件移动到另一个目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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