Loading ...
Sorry, an error occurred while loading the content.

Moving files using PERL?

Expand Messages
  • Paul_Lav
    Moving files using PERL? I wondering if it can be done? Thanks, Paul [Non-text portions of this message have been removed]
    Message 1 of 5 , Sep 5, 2002
    • 0 Attachment
      Moving files using PERL? I wondering if it can be done?

      Thanks,
      Paul


      [Non-text portions of this message have been removed]
    • jake@thegoop.com
      Yes, you can move files using Perl. I have made a program that does it, and i only have read Learning Perl. I can put the code in an email or upload the file
      Message 2 of 5 , Sep 5, 2002
      • 0 Attachment
        Yes, you can move files using Perl. I have made a program that does it,
        and i only have read Learning Perl. I can put the code in an email or
        upload the file if you want.

        Jake

        At 01:19 PM 9/5/2002, you wrote:
        >Moving files using PERL? I wondering if it can be done?
        >
        >Thanks,
        >Paul
        >
        >
        >[Non-text portions of this message have been removed]
        >
        >
        >Yahoo! Groups Sponsor
        >ADVERTISEMENT
        >
        >To unsubscribe from this group, send an email to:
        >perlforbeginners-unsubscribe@yahoogroups.com
        >
        >
        >
        >Your use of Yahoo! Groups is subject to the
        ><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.



        [Non-text portions of this message have been removed]
      • Paul_Lav
        If you could email it that would be great thanks. Paul ... From: To: Sent: Friday, September 06, 2002
        Message 3 of 5 , Sep 5, 2002
        • 0 Attachment
          If you could email it that would be great thanks.

          Paul
          ----- Original Message -----
          From: <jake@...>
          To: <perlforbeginners@yahoogroups.com>
          Sent: Friday, September 06, 2002 2:45 AM
          Subject: Re: [Perl for Beginners] Moving files using PERL?


          > Yes, you can move files using Perl. I have made a program that does it,
          > and i only have read Learning Perl. I can put the code in an email or
          > upload the file if you want.
          >
          > Jake
          >
          > At 01:19 PM 9/5/2002, you wrote:
          > >Moving files using PERL? I wondering if it can be done?
          > >
          > >Thanks,
          > >Paul
          > >
          > >
          > >[Non-text portions of this message have been removed]
          > >
          > >
          > >Yahoo! Groups Sponsor
          > >ADVERTISEMENT
          > >
          > >To unsubscribe from this group, send an email to:
          > >perlforbeginners-unsubscribe@yahoogroups.com
          > >
          > >
          > >
          > >Your use of Yahoo! Groups is subject to the
          > ><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
          >
          >
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          > To unsubscribe from this group, send an email to:
          > perlforbeginners-unsubscribe@yahoogroups.com
          >
          >
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
        • jake@thegoop.com
          here is the code: { print Name or original place: ; chomp($original = ); last if $original =~ /end|stop|cancel/i; print Destination folder: ;
          Message 4 of 5 , Sep 6, 2002
          • 0 Attachment
            here is the code:
            {
            print "Name or original place: ";
            chomp($original = <STDIN>);
            last if $original =~ /end|stop|cancel/i;
            print "Destination folder: ";
            chomp($new = <STDIN>);
            last if $original =~ /end|stop|cancel/i;
            rename("$original","$new/$original") || warn "cant move or rename file: $!";
            print "Would you move another file?(y/n) ";
            chomp($yesno = <STDIN>);
            redo if $yesno =~ /y|yes/i;
            last if $yesno =~ /y|no/i;
            }

            first line opens a "naked" control structure, so that i can end or redo
            when i wish.
            the next 6 lines ask for the original place of the file, if it is in the
            current directory, you simply enter the filename; then asks for destination
            folder, just enter the folder if its a subdirectory. the "last if"
            statements simply end the program if you type end, stop, or cancel. it
            then moves the file, then asks if you want to do another move; if yes,
            starts over, if no, ends. one thing you cant do is move a file from a
            subdirectory to the current directory. i haven't been able to do
            that. ask if you have any questions.
            Jake


            At 11:37 PM 9/5/2002, you wrote:
            >If you could email it that would be great thanks.
            >
            >Paul
            >----- Original Message -----
            >From: <jake@...>
            >To: <perlforbeginners@yahoogroups.com>
            >Sent: Friday, September 06, 2002 2:45 AM
            >Subject: Re: [Perl for Beginners] Moving files using PERL?
            >
            >
            > > Yes, you can move files using Perl. I have made a program that does it,
            > > and i only have read Learning Perl. I can put the code in an email or
            > > upload the file if you want.
            > >
            > > Jake
            > >
            > > At 01:19 PM 9/5/2002, you wrote:
            > > >Moving files using PERL? I wondering if it can be done?
            > > >
            > > >Thanks,
            > > >Paul
            > > >
            > > >
            > > >[Non-text portions of this message have been removed]
            > > >
            > > >
            > > >Yahoo! Groups Sponsor
            > > >ADVERTISEMENT
            > > >
            > > >To unsubscribe from this group, send an email to:
            > > >perlforbeginners-unsubscribe@yahoogroups.com
            > > >
            > > >
            > > >
            > > >Your use of Yahoo! Groups is subject to the
            > > ><<http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/>Y
            > ahoo! Terms of Service.
            > >
            > >
            > >
            > > [Non-text portions of this message have been removed]
            > >
            > >
            > >
            > > To unsubscribe from this group, send an email to:
            > > perlforbeginners-unsubscribe@yahoogroups.com
            > >
            > >
            > >
            > > Your use of Yahoo! Groups is subject to
            > <http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/
            > >
            >
            >
            >Yahoo! Groups Sponsor
            >ADVERTISEMENT
            >
            >To unsubscribe from this group, send an email to:
            >perlforbeginners-unsubscribe@yahoogroups.com
            >
            >
            >
            >Your use of Yahoo! Groups is subject to the
            ><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.



            [Non-text portions of this message have been removed]
          • Paul
            Thanks a lot! ... rename file: $! ; ... redo ... in the ... destination ... cancel. it ... yes, ... from a ... does it, ... email or ...
            Message 5 of 5 , Sep 20, 2002
            • 0 Attachment
              Thanks a lot!
              --- In perlforbeginners@y..., "jake@t..." <jake@t...> wrote:
              > here is the code:
              > {
              > print "Name or original place: ";
              > chomp($original = <STDIN>);
              > last if $original =~ /end|stop|cancel/i;
              > print "Destination folder: ";
              > chomp($new = <STDIN>);
              > last if $original =~ /end|stop|cancel/i;
              > rename("$original","$new/$original") || warn "cant move or
              rename file: $!";
              > print "Would you move another file?(y/n) ";
              > chomp($yesno = <STDIN>);
              > redo if $yesno =~ /y|yes/i;
              > last if $yesno =~ /y|no/i;
              > }
              >
              > first line opens a "naked" control structure, so that i can end or
              redo
              > when i wish.
              > the next 6 lines ask for the original place of the file, if it is
              in the
              > current directory, you simply enter the filename; then asks for
              destination
              > folder, just enter the folder if its a subdirectory. the "last if"
              > statements simply end the program if you type end, stop, or
              cancel. it
              > then moves the file, then asks if you want to do another move; if
              yes,
              > starts over, if no, ends. one thing you cant do is move a file
              from a
              > subdirectory to the current directory. i haven't been able to do
              > that. ask if you have any questions.
              > Jake
              >
              >
              > At 11:37 PM 9/5/2002, you wrote:
              > >If you could email it that would be great thanks.
              > >
              > >Paul
              > >----- Original Message -----
              > >From: <jake@t...>
              > >To: <perlforbeginners@y...>
              > >Sent: Friday, September 06, 2002 2:45 AM
              > >Subject: Re: [Perl for Beginners] Moving files using PERL?
              > >
              > >
              > > > Yes, you can move files using Perl. I have made a program that
              does it,
              > > > and i only have read Learning Perl. I can put the code in an
              email or
              > > > upload the file if you want.
              > > >
              > > > Jake
              > > >
              > > > At 01:19 PM 9/5/2002, you wrote:
              > > > >Moving files using PERL? I wondering if it can be done?
              > > > >
              > > > >Thanks,
              > > > >Paul
              > > > >
              > > > >
              > > > >[Non-text portions of this message have been removed]
              > > > >
              > > > >
              > > > >Yahoo! Groups Sponsor
              > > > >ADVERTISEMENT
              > > > >
              > > > >To unsubscribe from this group, send an email to:
              > > > >perlforbeginners-unsubscribe@y...
              > > > >
              > > > >
              > > > >
              > > > >Your use of Yahoo! Groups is subject to the
              > > >
              ><<http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/
              >Y
              > > ahoo! Terms of Service.
              > > >
              > > >
              > > >
              > > > [Non-text portions of this message have been removed]
              > > >
              > > >
              > > >
              > > > To unsubscribe from this group, send an email to:
              > > > perlforbeginners-unsubscribe@y...
              > > >
              > > >
              > > >
              > > > Your use of Yahoo! Groups is subject to
              > >
              <http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/
              > > >
              > >
              > >
              > >Yahoo! Groups Sponsor
              > >ADVERTISEMENT
              > >
              > >To unsubscribe from this group, send an email to:
              > >perlforbeginners-unsubscribe@y...
              > >
              > >
              > >
              > >Your use of Yahoo! Groups is subject to the
              > ><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
              >
              >
              >
              > [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.