Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: M626
  • Order by date
  1. M626

    File Growing

    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...
  2. M626

    File Growing

    Does anyone know of a simple, say two lines of code i can use to test if a file is growing, and if it's not move it to a unc path?
  3. M626

    Sort by Date

    The goal is to look at a directory and write the contents to a file sorted by date modified or date created.
  4. M626

    Sort by Date

    I probably want 'mtime' not 'ctime'. I am looking for some examples on how i can use this.
  5. M626

    Sort by Date

    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...??
  6. M626

    Sort by Date

    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"...
  7. M626

    perl Syntax

    I found this code to delete every that is *.tst but how can i can it to delete anything that's ._*.* unlink qq($dir\\$file) if $file=~/\.tst$/i;
  8. M626

    Mirror directory

    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...
  9. M626

    Mirror directory

    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,
  10. M626

    HTML flash

    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...
  11. M626

    Rename files in folder to Folder name

    how can i rename all the files in a folder to the folder name and append _1 _2 _3 and so on for each additional file in the folder?
  12. M626

    Delete Files From Directory

    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;
  13. M626

    Delete Files From Directory

    if it's windows, i can simple change that to "C:\test\" , correct?
  14. M626

    Delete Files From Directory

    In my list, do i need the full path to the file if i use it this way? open FH, "list_of_files.txt"; unlink <FH>; close FH;
  15. M626

    Delete Files From Directory

    is there a simple comand to unlink specific files or reference everything in a text file?
  16. M626

    Delete Files From Directory

    What is the most efficent and simplest way to delete files from a directory. Control whats deleted by a text file that list files that can be deleted.
  17. M626

    Keep connection alive

    it's running on a windows machine.
  18. M626

    Keep connection alive

    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...
  19. M626

    FIle Handling

    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;
  20. M626

    FIle Handling

    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...

Part and Inventory Search

Back
Top