Gossamer Forum
Home : General : Perl Programming :

Moving files

Quote Reply
Moving files
Hi! I'm trying to find out whether if there is a way to move a file from one directory to another usign perl. For example, I want to move test.shtml from /doc to /main directory. The reason why i'm asking is because I want the perl script to runon crontab and will move files from one directory to another at a particular time.

Thanks.
Julian
Quote Reply
Re: [vampy] Moving files In reply to
Not sure if there is a particular function, but what about;

`mv /path/to/old/file.txt /path/to/new/file.txt`;

Unimpressed

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Moving files In reply to
Thanks. I thought that was a univ command? I did find a reference rename ("/doc/test.shtml", /new/test.shtml") stating that this command will move files. Do you know if this is true?
Julian
Quote Reply
Re: [vampy] Moving files In reply to
http://search.cpan.org/...8.0/lib/File/Copy.pm
Quote Reply
Re: [Paul] Moving files In reply to
Thanks for all your help. Smile Both the methods suggested worked.
Julian