Hi,<br><br>Does anyone know how to make a perl script copy/move/delete files in a windows/DOS environment?<br><br>Thanks!<br>Huck<br><A HREF="mailto:huckleberryfinn@beer.com">huckleberryfinn@beer.com</A>
To copy and move files use the File::Copy module that has the copy and move modules.<br>i.e.<br><br>use File::Copy;<br>copy("file.txt","file2.txt"<br>move("file2.txt",".."<br><br>To delete a file use unlink function.<br>i.e.<br>print 'Deleted ', unlink(<*.old>, ' files.';<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.