Oct 20, 2006 #1 davef101 MIS Mar 3, 2006 34 GB what code would move a .txt file from one directory to another directory on my server ?
Oct 20, 2006 #2 Kirsle Programmer Jan 21, 2006 1,179 US Code: use File::Copy; move ("/home/directory/one/file.txt", "/home/somewhere/else/file.txt"); ------------- Kirsle.net | Kirsle's Programs and Projects Upvote 0 Downvote
Code: use File::Copy; move ("/home/directory/one/file.txt", "/home/somewhere/else/file.txt"); ------------- Kirsle.net | Kirsle's Programs and Projects
Oct 20, 2006 #4 KevinADC Technical User Jan 21, 2005 5,070 US or just use perls rename() function: Code: rename("/home/directory/one/file.txt","/home/somewhere/else/file.txt"); File::Copy is a bit more flexible though if rename() doesn't work for some reason. - Kevin, perl coder unexceptional! Upvote 0 Downvote
or just use perls rename() function: Code: rename("/home/directory/one/file.txt","/home/somewhere/else/file.txt"); File::Copy is a bit more flexible though if rename() doesn't work for some reason. - Kevin, perl coder unexceptional!