|
Answer» I have a number of NAS disks attached to my windows 10 desktop. For some strange reason, some of them go offline. I have a batch file to re-connect them, issuing "Net Use" commands. If I click on the file "Upnet,bat" I just get a flash of the command prompt window and no results. If I open the editor on the same file and use cntrl-a, cntrl-c then open a command prompt window and paste the results into the command prompt window, it works fine. This two-step process is fine for the task but I was wondering how to get it to run with a one click on the shortcut to the batch file.
Thanks
[attachment deleted by admin to conserve space]If you want to see the results use the PAUSE command at the end of your batch file.I had a PROBLEM with Buffalo NAS drives going to sleep on us and this was breaking mapped drives for users. My solution was to have an automated routine that every 15 minutes would as I called it "TICKLE" the NAS to keep it awake. I had a batch that ran with a 15 minute delay and it would transfer a small text file from the NAS to the server that was keeping the DRIVE awake. I used SLEEP to have 15 minute delay and a goto loop in the batch file to have it xcopy the file from a specific DIRECTORY of each NAS drive over the network and then a clean up process that would delete the very small less than 1KB file after it was transferred, this way every iteration at 15 min intervals caused it to work the NAS storage systems that we had and problem solved.
I contacted Buffalo about this and they didn't have a CURE for the sleep state issue that their NAS drives had. We had about $8000 worth of NAS devices and couldn't return them, so this was the quick band aid to keep them from going into a sleep state and causing users with mapped drives to the NAS drives to break. I guess this is one of the problems with buying Green Power Efficient NAS drives that shut off, put the drives in sleep state not spinning and then spin back up when needed.
If this is the case with the NAS Sleep State then this could be a valid fix for your site as well.
|