Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am making backups to two alternating USB sticks. The problem is that the sticks get different device letters although I use the same connection. This means that before making the backup I must check the letter on Explorer (I use Windows 8.1), then I have to feed it to the Perl script by hand; I want the script to find the letter all by itself.
I tried the following code but then I got a pop-up window telling me to insert a device:
my $dev = ''; $dev = 'G' if( -d 'G:\\af' ); $dev = 'H' if( -d 'H:\\af' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Find device letter
by Corion (Patriarch) on Mar 20, 2014 at 20:46 UTC | |
by tye (Sage) on Mar 21, 2014 at 05:05 UTC | |
|
Re: Find device letter
by wind (Priest) on Mar 21, 2014 at 01:02 UTC |