Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


RogerBoes
2013-04-02T15:25:23Z
I just would like post a quick question;

Is there an easy / quick way to define a job to check if a Network drive exists, and if NOT create the link.
Like the following code can do:

IF NOT EXIST W:\NUL goto NOT_EXIST
MD W:\MY_TEMP
IF NOT EXIST W:\MY_TEMP\NUL GOTO NOT_READY
RD W:\MY_TEMP
ECHO DRIVE W: IS READY .
GOTO END

:NOT_EXIST
ECHO %date% %time% - DRIVE W: DOES NOT EXIST! >> wlog.txt
psexec -s net use w: \\c-700s532\COGNOS-Dev$\COGNOS /user:IFMUK\c-700u09 C0gn05PD+ran5
ECHO %date% %time% - DRIVE W: CONNECTED AGAIN! >> wlog.txt
GOTO END

:NOT_READY
ECHO %date% %time% - DRIVE W: IS NOT READY >> wlog.txt
psexec -s net use w: /d
psexec -s net use w: \\c-700s532\COGNOS-Dev$\COGNOS /user:IFMUK\c-700u09 C0gn05PD+ran5
ECHO %date% %time% - DRIVE W: CONNECTED AGAIN! >> wlog.txt
GOTO END

:END


I could see some coding in Powershell. But I thought this should be easier to establish within Visualcron.

Regards
Sponsor
Forum information
Support
2013-04-03T08:25:00Z
Use the Folder condition instead and point to a folder on the Share.

Or you can use the .NET Code Task to check for a specific folder.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top