wasabi3689
asked on
Why cannot copy this file?
I run the following script .cmd file
@echo off
setlocal enabledelayedexpansion
set startTime=%Date% %time%
echo Start Time: %startTime%
Robocopy /s \\Image1\Images\ICSStorage \20080211\ C43F9AAF-B 3F1-46EC-A 2BE-E3B8BE D78B7E.tif \\testsql3\NGProductionDoc s\NGSource Docs\ICSSt orage\2008 0211\C43F9 AAF-B3F1-4 6EC-A2BE-E 3B8BED78B7 E.tif /dcopy:t /mir /FFT /Z /np /tee /log+:D:\NGProductionDocs\ Config\Log \CopyOverL og\CopyOve r_ICSStora ge.log
echo Finish Time: %Date% %time%
pause
I have the following error
'\\testsql3\Config\Mainten ance\NGPRD ToTestSQL3 '
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Start Time: Sun 01/13/2019 0:07:31.87
Log File : D:\NGProductionDocs\Config \Log\CopyO verLog\Cop yOver_ICSS torage.log
-------------------------- ---------- ---------- ---------- ---------- ---------- ---
ROBOCOPY :: Robust File Copy for Windows
-------------------------- ---------- ---------- ---------- ---------- ---------- ---
Started : Sun Jan 13 00:07:31 2019
Source : \\Image1\Images\ICSStorage \20080211\ C43F9AAF-B 3F1-46EC-A 2BE-E3B8BE D7
8B7E.tif\
Dest : \\testsql3\NGProductionDoc s\NGSource Docs\ICSSt orage\2008 0211\C43F9 AA
F-B3F1-46EC-A2BE-E3B8BED78 B7E.tif\
Files : *.*
Options : *.* /FFT /TEE /S /E /COPY:DAT /DCOPY:T /PURGE /MIR /Z /NP /R:1000000
/W:30
-------------------------- ---------- ---------- ---------- ---------- ---------- --
2019/01/13 00:07:31 ERROR 267 (0x0000010B) Accessing Source Directory \\Image1\I
mages\ICSStorage\20080211\ C43F9AAF-B 3F1-46EC-A 2BE-E3B8BE D78B7E.tif \
The directory name is invalid.
Finish Time: Sun 01/13/2019 0:07:31.95
Press any key to continue . . .
Can you tell what went wrong with my script?
@echo off
setlocal enabledelayedexpansion
set startTime=%Date% %time%
echo Start Time: %startTime%
Robocopy /s \\Image1\Images\ICSStorage
echo Finish Time: %Date% %time%
pause
I have the following error
'\\testsql3\Config\Mainten
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Start Time: Sun 01/13/2019 0:07:31.87
Log File : D:\NGProductionDocs\Config
--------------------------
ROBOCOPY :: Robust File Copy for Windows
--------------------------
Started : Sun Jan 13 00:07:31 2019
Source : \\Image1\Images\ICSStorage
8B7E.tif\
Dest : \\testsql3\NGProductionDoc
F-B3F1-46EC-A2BE-E3B8BED78
Files : *.*
Options : *.* /FFT /TEE /S /E /COPY:DAT /DCOPY:T /PURGE /MIR /Z /NP /R:1000000
/W:30
--------------------------
2019/01/13 00:07:31 ERROR 267 (0x0000010B) Accessing Source Directory \\Image1\I
mages\ICSStorage\20080211\
The directory name is invalid.
Finish Time: Sun 01/13/2019 0:07:31.95
Press any key to continue . . .
Can you tell what went wrong with my script?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try map the paths with a letter before start robocopy, after the copy you can remove the mapping
Have you tried putting the source and seat path in "\\server\folder"
Also are you trying to just include the single tif file or the whole directory content?
Also are you trying to just include the single tif file or the whole directory content?
ASKER
I cannot just copy the entire folder, there will be too many files in the folder. I just want to copy the some files within the folder. If I don't use robocopy, can I just use just copy command to copy the folder name and that file. If so, how to construct the line
Your command, if used as shown in my comment, will copy a single file.
But what do you really want to do? The syntax used doesn't really makes sense, e.g because you name a single file but use /s to copy subfolders too.
But what do you really want to do? The syntax used doesn't really makes sense, e.g because you name a single file but use /s to copy subfolders too.
For a single file I would say 100% yes