Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.


Go Back   Vista Forums > Vista Forums > Network & Sharing

RB

Vista - Directory Name Ends Up Hidden After Network Copy

Reply
 
03-18-2009   #1


Vista Home Premium 64bit.
 
 

Directory Name Ends Up Hidden After Network Copy

I have two batch scripts (Script 1 & Script 2). A directory name is being hidden under both scripts when I view it through explorer. Depending on how I write the script different level is being hidden. I am not sure if the problem is caused by the mapping or by the robocopy command. Can anyone please help?

Script 1 - The destination directory (2009-03-18) right under the mapped drive ends up hidden
@ECHO OFF
set d=R:
rem
rem map network drive
net use %d% /d /y
rem
rem map network drive
net use %d% "\\RND4250\Steve_Backups\Daily"
rem
rem generate directory name
set h=%time:~0,2%
IF %time:~0,2% LSS 10 (set h=0%time:~1,1%)
set m=%time:~3,2%
set dirname=%date:~10,4%-%date:~4,2%-%date:~7,2%
rem
rem create directory
%d%
IF EXIST %dirname% (Set dirname=%dirname%-%h%%m%)
mkdir %dirname%
rem
rem generate robocopy command
set from=C:\Users\Steve\Documents
set to=%d%\%dirname%
robocopy "%from%" "%to%" /E /COPYAT /R:10 /Z /XJ /log:%d%\RoboCopyLog.txt
rem
rem unmap network drive
net use %d% /d /y
exit

Script 2 - The destination directory (Documents) right under 2009-03-18 ends up being hidden
@ECHO OFF
set d=R:
rem
rem map network drive
net use %d% /d /y
rem
rem map network drive
net use %d% "\\RND4250\Steve_Backups"
rem
rem generate directory name
set h=%time:~0,2%
IF %time:~0,2% LSS 10 (set h=0%time:~1,1%)
set m=%time:~3,2%
set dirname=%date:~10,4%-%date:~4,2%-%date:~7,2%
rem
rem create directory
%d%
cd Daily
IF EXIST %dirname% (Set dirname=%dirname%-%h%%m%)
mkdir %dirname%
rem
rem generate robocopy command
set from=C:\Users\Steve\Documents
set to=%d%\Daily\%dirname%
robocopy "%from%" "%to%" /E /COPYAT /R:10 /Z /XJ /log:%d%\RoboCopyLog.txt
rem
rem unmap network drive
net use %d% /d /y
exit

My System SpecsSystem Spec
Reply

RB


Thread Tools


Similar Threads for: Directory Name Ends Up Hidden After Network Copy
Thread Forum
copy folder with hidden share VB Script
Web Page printed to file ends up in hidden folder Vista print fax & scan
Vista says my home network wireless is a hidden network Network & Sharing
Active Directory and group copy PowerShell
How to copy file to top level directory Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd