I have the following script but it never moves the file... does anyone see why it might not be working??
#!/usr/bin/perl
use File::stat;
$req = "D:\\Temp\\In"; #give the location of the source files
opendir(DIR ,"$req") or die "cannot open $req";
$outfile = "list.txt";
open OUT...
I would probably want to use 'ctime' in the stat function but how would i sort them. I would probably need to obtain that info on all the files first...??
I am using the following to output a file listing the contents of a directory. Is there anyway i can modify this to output by date created or date modifed?
#!perl
print "Content-type: text/plain\n\n";
# Configuration:
$internal_path = "r:/";
$list_directories = "true";
$list_files = "true"...
I have the following code to mirror a directory on change but haven't found a way to make the files only 0bytes in size.
#!/usr/bin/perl
# Allow us to copy files correctly.
use File::Copy;
# User-configurable. Don't include a / at the end of the path.
# Source = Base directory to start the...
Hi,
I need to mirror a directory using perl but the destination directory files needs to be 0 bytes in size. So i will end up with a directory of files names simular to a log but with actual files.
Thanks,
Hi all... i am using the following HTML to load a flash video on a iweb page. Is there a way i create links on my page to different flash files on my web server and have it play that video? I would think i have to set the 'embed src' and 'value' to a variable that's changed every time a new...
I tried the following and it still not deleting the file i have listed in the my deletelist.
#!/usr/bin/perl
open FH, "deletelist.dat";
unlink map { "C:/Temp/" . $_ } <FH>;
close FH;
I am having a problem with this script. I connect to a mapped drive and test against a text file(listDir.txt) if those files listed in the text file are in the directory. if there is a file that is in the directory but not on the list, it get deleted. My problem is the drive become...
How do i remove the path from being printed?
#!/opt/perl5/bin/perl
use strict;
use warnings;
my @files = glob "*";
my $string;
for (@files) {$string .= $_ . " "}
$string .= "\n";
print $string;
Hi,
I am looking to do the following in perl. I know how to do it in vb but need it in perl.
I need a script to open a text file with test that contain file names, one per line. Once it opens the file, i need to remove the carage return and separate the file names by a space. Also, i need...
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.