![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How to wake-up drive A semi-novice here. I have a w-script that copies files to various computers on the network. All works well except: An external drive powers-off, and therefore takes about 20 seconds to spin-up. So, since the drive is "dead" the script skips this part. I need a command to poke the drive awake. Guidance please. Jesse |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How to wake-up drive "J" <JFS@xxxxxx> wrote in message news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx Quote: >A semi-novice here. > > I have a w-script that copies files to various computers on the network. > > All works well except: > An external drive powers-off, and therefore takes about 20 seconds to > spin-up. > So, since the drive is "dead" the script skips this part. > > I need a command to poke the drive awake. > > Guidance please. > > Jesse > generated while the disk is inaccessible, then loop until the error disappears. If this is not clear, let's have a look at your code. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How to wake-up drive > Quote: > "J" <JFS@xxxxxx> wrote in message > news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx Quote: >>A semi-novice here. >> >> I have a w-script that copies files to various computers on the network. >> >> All works well except: >> An external drive powers-off, and therefore takes about 20 seconds to >> spin-up. >> So, since the drive is "dead" the script skips this part. >> >> I need a command to poke the drive awake. >> >> Guidance please. >> >> Jesse >> > Use an "on error resume next" statement to capture the error that is > generated while the disk is inaccessible, then loop until the error > disappears. If this is not clear, let's have a look at your code. > I place the "on error resume next" line at the beginning of the scripts to prevent the scripts from exiting. I would rather some of the tasks be accomplished than none. The scripts are totally linear: no loops: Create the backup folder with date and time zip the identified folders and put them into the backup folder copy the backup folder to a drive on another machine some days, copy the folder to the external drive J |
My System Specs![]() |
| | #4 (permalink) |
| | Re: How to wake-up drive "J" <JFS@xxxxxx> wrote in message news:B64CDBB2-7AB7-49E2-B24D-D172FD044AF0@xxxxxx Quote: Quote: > > >> "J" <JFS@xxxxxx> wrote in message >> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx Quote: >>>A semi-novice here. >>> >>> I have a w-script that copies files to various computers on the network. >>> >>> All works well except: >>> An external drive powers-off, and therefore takes about 20 seconds to >>> spin-up. >>> So, since the drive is "dead" the script skips this part. >>> >>> I need a command to poke the drive awake. >>> >>> Guidance please. >>> >>> Jesse >>> >> Use an "on error resume next" statement to capture the error that is >> generated while the disk is inaccessible, then loop until the error >> disappears. If this is not clear, let's have a look at your code. >> > Thank you for your response. > > I place the "on error resume next" line at the beginning of the scripts to > prevent the scripts from exiting. I would rather some of the tasks be > accomplished than none. > > The scripts are totally linear: no loops: > Create the backup folder with date and time > zip the identified folders and put them into the backup folder > copy the backup folder to a drive on another machine > some days, copy the folder to the external drive statements)? Does the script invoke any functions or subroutines? If the answer to either of the two questions is yes, then your 'on error resume next' line at the beginning of the script really means : 1) Do not report any errors. 2) For some errors, change the order in which statements are executed, depending on where errors occur. The net result is that when the script ends, it may be difficult or impossible to know what statements were actually executed and which ones were not, or which statements that logically should not have been executed, actually were executed because of an error. Paul Randall |
My System Specs![]() |
| | #5 (permalink) |
| | Re: How to wake-up drive "J" <JFS@xxxxxx> wrote in message news:B64CDBB2-7AB7-49E2-B24D-D172FD044AF0@xxxxxx Quote: Quote: > > >> "J" <JFS@xxxxxx> wrote in message >> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx Quote: >>>A semi-novice here. >>> >>> I have a w-script that copies files to various computers on the network. >>> >>> All works well except: >>> An external drive powers-off, and therefore takes about 20 seconds to >>> spin-up. >>> So, since the drive is "dead" the script skips this part. >>> >>> I need a command to poke the drive awake. >>> >>> Guidance please. >>> >>> Jesse >>> >> Use an "on error resume next" statement to capture the error that is >> generated while the disk is inaccessible, then loop until the error >> disappears. If this is not clear, let's have a look at your code. >> > Thank you for your response. > > I place the "on error resume next" line at the beginning of the scripts to > prevent the scripts from exiting. I would rather some of the tasks be > accomplished than none. > > The scripts are totally linear: no loops: > Create the backup folder with date and time > zip the identified folders and put them into the backup folder > copy the backup folder to a drive on another machine > some days, copy the folder to the external drive > > J is not a good idea. It can make debugging extremely difficult. As I said before, if you post your code here then someone will show you how to create a loop to deal with your issue. |
My System Specs![]() |
| | #6 (permalink) |
| | Re: How to wake-up drive "Pegasus [MVP]" <news@xxxxxx> wrote in message news:%23ywwoXSLKHA.2404@xxxxxx Quote: > > "J" <JFS@xxxxxx> wrote in message > news:B64CDBB2-7AB7-49E2-B24D-D172FD044AF0@xxxxxx Quote: Quote: >> > >>> "J" <JFS@xxxxxx> wrote in message >>> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx >>>>A semi-novice here. >>>> >>>> I have a w-script that copies files to various computers on the >>>> network. >>>> >>>> All works well except: >>>> An external drive powers-off, and therefore takes about 20 seconds to >>>> spin-up. >>>> So, since the drive is "dead" the script skips this part. >>>> >>>> I need a command to poke the drive awake. >>>> >>>> Guidance please. >>>> >>>> Jesse >>>> >>> >>> Use an "on error resume next" statement to capture the error that is >>> generated while the disk is inaccessible, then loop until the error >>> disappears. If this is not clear, let's have a look at your code. >>> >> Thank you for your response. >> >> I place the "on error resume next" line at the beginning of the scripts >> to prevent the scripts from exiting. I would rather some of the tasks be >> accomplished than none. >> >> The scripts are totally linear: no loops: >> Create the backup folder with date and time >> zip the identified folders and put them into the backup folder >> copy the backup folder to a drive on another machine >> some days, copy the folder to the external drive >> >> J > Placing the "on error resume next" statement at the beginning of your code > is not a good idea. It can make debugging extremely difficult. As I said > before, if you post your code here then someone will show you how to > create a loop to deal with your issue. > The purpose of placing the statement at the beginning is so no errors are reported to the users. These scripts run on more than a dozen computers. During verifying, I commented the line when verifying the subsequent steps. The scripts work fine except when the external disk has spun-down. So, is there a simple way to "poke" the disk awake? |
My System Specs![]() |
| | #7 (permalink) |
| | Re: How to wake-up drive "Paul Randall" <Paulr901@xxxxxx> wrote in message news:uyh%23V5QLKHA.1248@xxxxxx Quote: > > "J" <JFS@xxxxxx> wrote in message > news:B64CDBB2-7AB7-49E2-B24D-D172FD044AF0@xxxxxx Quote: Quote: >> > >>> "J" <JFS@xxxxxx> wrote in message >>> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx >>>>A semi-novice here. >>>> >>>> I have a w-script that copies files to various computers on the >>>> network. >>>> >>>> All works well except: >>>> An external drive powers-off, and therefore takes about 20 seconds to >>>> spin-up. >>>> So, since the drive is "dead" the script skips this part. >>>> >>>> I need a command to poke the drive awake. >>>> >>>> Guidance please. >>>> >>>> Jesse >>>> >>> >>> Use an "on error resume next" statement to capture the error that is >>> generated while the disk is inaccessible, then loop until the error >>> disappears. If this is not clear, let's have a look at your code. >>> >> Thank you for your response. >> >> I place the "on error resume next" line at the beginning of the scripts >> to prevent the scripts from exiting. I would rather some of the tasks be >> accomplished than none. >> >> The scripts are totally linear: no loops: >> Create the backup folder with date and time >> zip the identified folders and put them into the backup folder >> copy the backup folder to a drive on another machine >> some days, copy the folder to the external drive > Does the script use any branching logic (for example, 'If' and 'Select > Case' statements)? > Does the script invoke any functions or subroutines? > > If the answer to either of the two questions is yes, then your 'on error > resume next' line at the beginning of the script really means : > 1) Do not report any errors. > 2) For some errors, change the order in which statements are executed, > depending on where errors occur. > The net result is that when the script ends, it may be difficult or > impossible to know what statements were actually executed and which ones > were not, or which statements that logically should not have been > executed, actually were executed because of an error. > > Paul Randall > No loops, straight through and simple.. The purpose of placing the statement at the beginning is so no errors are reported to the users. These scripts run on more than a dozen computers. I commented the line when verifying the subsequent steps. The scripts work fine except when the external disk has spun-down. So, is there a simple way to "poke" the disk awake? |
My System Specs![]() |
| | #8 (permalink) |
| | Re: How to wake-up drive "J" <JFS@xxxxxx> wrote in message news:51DE1CD7-6155-4418-A996-8B48E1B9F67C@xxxxxx Quote: > > "Pegasus [MVP]" <news@xxxxxx> wrote in message > news:%23ywwoXSLKHA.2404@xxxxxx Quote: >> >> "J" <JFS@xxxxxx> wrote in message >> news:B64CDBB2-7AB7-49E2-B24D-D172FD044AF0@xxxxxx Quote: >>> > >>>> "J" <JFS@xxxxxx> wrote in message >>>> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx >>>>>A semi-novice here. >>>>> >>>>> I have a w-script that copies files to various computers on the >>>>> network. >>>>> >>>>> All works well except: >>>>> An external drive powers-off, and therefore takes about 20 seconds to >>>>> spin-up. >>>>> So, since the drive is "dead" the script skips this part. >>>>> >>>>> I need a command to poke the drive awake. >>>>> >>>>> Guidance please. >>>>> >>>>> Jesse >>>>> >>>> >>>> Use an "on error resume next" statement to capture the error that is >>>> generated while the disk is inaccessible, then loop until the error >>>> disappears. If this is not clear, let's have a look at your code. >>>> >>> >>> Thank you for your response. >>> >>> I place the "on error resume next" line at the beginning of the scripts >>> to prevent the scripts from exiting. I would rather some of the tasks be >>> accomplished than none. >>> >>> The scripts are totally linear: no loops: >>> Create the backup folder with date and time >>> zip the identified folders and put them into the backup folder >>> copy the backup folder to a drive on another machine >>> some days, copy the folder to the external drive >>> >>> J >> Placing the "on error resume next" statement at the beginning of your >> code is not a good idea. It can make debugging extremely difficult. As I >> said before, if you post your code here then someone will show you how to >> create a loop to deal with your issue. >> > Thank you for your comments. > > The purpose of placing the statement at the beginning is so no errors are > reported to the users. > > These scripts run on more than a dozen computers. > > During verifying, I commented the line when verifying the subsequent > steps. > > The scripts work fine except when the external disk has spun-down. > > So, is there a simple way to "poke" the disk awake? specific suggestions. It would be equivalent to guessing and I don't want to guess when it comes to coding. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| DVD/CD drive disappearing from Vista x64 on wake up | Vista General | |||
| wake up | Vista performance & maintenance | |||
| SATA hard drive won't wake up | Vista hardware & devices | |||
| Wake up! | Vista General | |||
| How to prevent Ready Boost drive from appearing after "wake up"? | Vista performance & maintenance | |||