Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

TCC 9.02 vs 4NT 8.02 difference - for %a COPY

Jun
121
0
Hi

I have a command like so

for /d %a in (PA*.*) do copy /s %a\%a2009\%a200907\*.* m:\ZipStorage\OpenTV\UK\Programs\%a\%a2009\%a200907

Now it works out that the destination directories dont exist but TCC 9.02.157 creates all the intermediate destination directories to populate the final equivalent sub-directories with data files.

- good, exactly what I want.

But if I try the same command under 4NT 8.02.103, it barfs as the destination directories dont exist with
"Directory not found in M:\zipstorage..."

I was not aware of this 4NT8.02/TCC 9.02 difference.

Is there a way of getting 4NT 8.02 to do the same?
Would it help if this was 8.02.106 ?

Cheers

Stephen Howe


 
Update

I have tried this with 4NT 8.02

for /d %a in (SA*.*) do ( md /s m:\ZipStorage\OpenTV\UK
\Spots\%a\%a2009\%a200907\ ^ copy /s %a\%a2009\%a200907\*.* m:\ZipStorage\OpenTV
\UK\Spots\%a\%a2009\%a200907)

(SA is similar to QA in previous message, same directory structure)

but I get messages like

4NT: (Sys) The filename, directory name, or volume label syntax is incorrect.
"M:\InfoSysData\UK\Spots\SA0172\SA01722009\SA0172200907\*.*"
4NT: (Sys) Cannot create a file when that file already exists.
"M:\ZipStorage\OpenTV\UK\Spots\SA0172\SA01722009\SA0172200907"
4NT: (Sys) Cannot create a file when that file already exists.
"M:\ZipStorage\OpenTV\UK\Spots\SA0177\SA01772009\SA0177200907"
4NT: (Sys) Cannot create a file when that file already exists.
"M:\InfoSysData\UK\Spots\copy"

So painful

Cheers

Stephen Howe
 
I understand this ever less now. One set of commands worked with 4NT 8.02 (that is with MD... ^ COPY...).
Theory:
Perhaps on 1st attempt the MD work but somehow COPY did not kick in
On 2nd attempt the COPY worked as the MD was no longer necessary.

All very strange
(I need to do one more set of copying so I will try again with 4NT 8.02)

Stephen Howe
 
Stephen Howe wrote:
| Hi
|
| I have a command like so
|
| for /d %a in (PA*.*) do copy /s %a\%a2009\%a200907\*.*
| m:\ZipStorage\OpenTV\UK\Programs\%a\%a2009\%a200907
|
| Now it works out that the destination directories dont exist but TCC
| 9.02.157 creates all the intermediate destination directories to
| populate the final equivalent sub-directories with data files.
|
| - good, exactly what I want.
|
| But if I try the same command under 4NT 8.02.103, it barfs as the
| destination directories dont exist with "Directory not found in
| M:\zipstorage..."
|
| I was not aware of this 4NT8.02/TCC 9.02 difference.
|
| Is there a way of getting 4NT 8.02 to do the same?
| Would it help if this was 8.02.106 ?

No. This is one of the features added in V9.
--
Steve
 
Stephen Howe wrote:
| I understand this ever less now. One set of commands worked with 4NT
| 8.02 (that is with MD... ^ COPY...). Theory:
| Perhaps on 1st attempt the MD work but somehow COPY did not kick
| in On 2nd attempt the COPY worked as the MD was no longer
| necessary.
|
| All very strange
| (I need to do one more set of copying so I will try again with 4NT
| 8.02)

My WAG is that in the first pass the COPY command is attempted before the
new directory is actually on the disk. Naturally in the 2nd pass it's
already there, so it is not needed. I'd simplify the task using an alias
instead of MD (by the way, you may want to bypass updating JPSTREE.IDX
utilizing the /N option of MD):

alias MDX=`if not isdir %1 ( md /n %1 %+ delay /m 100 )`

--
HTH, Steve
 

Similar threads

Back
Top