Bat file question

R

RScotti

Hi,
Is there some kind of a switch I can I have in my bat file that would show the target destination also rather than just
the source when it displays the CMD window?


From this:
C:\users\rls\Agent\Data\00000002.IDX

To something like this:
C:\users\rls\Agent\Data\00000002.IDX D:\Agent\Data\00000002.IDX


Have a good day,
RScotti

remove "nospam" in order to email me.
 
P

Poprivet

RScotti said:
Hi,
Is there some kind of a switch I can I have in my bat file that would
show the target destination also rather than just the source when it
displays the CMD window?


From this:
C:\users\rls\Agent\Data\00000002.IDX

To something like this:
C:\users\rls\Agent\Data\00000002.IDX D:\Agent\Data\00000002.IDX


Have a good day,
RScotti

remove "nospam" in order to email me.

Not like that. But you could assign each to a variable.
 
P

Pegasus \(MVP\)

RScotti said:
Hi,
Is there some kind of a switch I can I have in my bat file that would show
the target destination also rather than just
the source when it displays the CMD window?


From this:
C:\users\rls\Agent\Data\00000002.IDX

To something like this:
C:\users\rls\Agent\Data\00000002.IDX D:\Agent\Data\00000002.IDX


Have a good day,
RScotti

remove "nospam" in order to email me.

"Source" for what? "Target" for what? In order to have
a source and a target, you need some command, not
just a Command Prompt.
 
R

RScotti

"Source" for what? "Target" for what? In order to have
a source and a target, you need some command, not
just a Command Prompt.

Hi Pegasus,
Not sure I understand you.The above command is from the bat file and is displayed in the command prompt window when
executed.I want the display in the CMD window to show both the source & destination AS IT IS IN THE BAT FILE!

Naturally each one of these commands have several sources & destinations.
BUT this is the way the display shows it. Just all the Sources. This is just for the first line for the 1st Agent
destination below:
C:\users\rls\Agent\Data\00000002.DAT
C:\users\rls\Agent\Data\00000002.IDX
C:\users\rls\Agent\Data\0000001D.DAT
C:\users\rls\Agent\Data\0000001D.IDX
C:\users\rls\Agent\Data\0000001E.IDX
C:\users\rls\Agent\Data\00000020.DAT
C:\users\rls\Agent\Data\00000020.IDX
C:\users\rls\Agent\Data\00000022.DAT
C:\users\rls\Agent\Data\00000022.IDX
C:\users\rls\Agent\Data\00000027.DAT
C:\users\rls\Agent\Data\00000027.IDX
C:\users\rls\Agent\Data\00000028.DAT
C:\users\rls\Agent\Data\00000028.IDX
C:\users\rls\Agent\Data\0000002A.DAT
C:\users\rls\Agent\Data\0000002A.IDX
C:\users\rls\Agent\Data\AGENT.INI
C:\users\rls\Agent\Data\agentini.bak
C:\users\rls\Agent\Data\custenu5.tlx
C:\users\rls\Agent\Data\folders.dat
C:\users\rls\Agent\Data\mutex.tmp
C:\users\rls\Agent\Data\MWORDS.DAT
C:\users\rls\Agent\Data\MWORDS.IDX
C:\users\rls\Agent\Data\tasklog.xml
C:\users\rls\Agent\Data\log\RouterLog-2007-10-28.xml
C:\users\rls\Agent\Data\log\RouterLog.idx
25 File(s) copied

Here is the complete Bat file:
@echo off
xcopy /s /y /d /h /c "C:\users\rls\Agent" "K:\Agent\"
xcopy /s /y /d /h /c "C:\users\rls\Agent1" "K:\Agent1\"
xcopy /s /y /d /h /c "C:\users\rls\Agent" "D:\Agent\"
xcopy /s /y /d /h /c "C:\users\rls\Agent" "M:\Agent\"
xcopy /s /y /d /h /c "C:\users\rls\Agent1" "M:\Agent1\"
xcopy /s /y /d /h /c "C:\users\rls\Calendar\rls's.ics" "D:\Calendar\"
xcopy /s /y /d /h /c "C:\users\rls\Calendar\rls's.ics" "K:\Calendar\"
xcopy /s /y /d /h /c "C:\users\rls\Calendar\rls's.ics" "M:\Calendar\"
xcopy /s /y /d /h /c "C:\Users\rls\Documents" "K:\Documents\"
xcopy /s /y /d /h /c "C:\Users\rls\Documents" "D:\Documents\"
xcopy /s /y /d /h /c "C:\Users\rls\Documents" "M:\Documents\"
xcopy /s /y /d /h /c "C:\Users\rls\Downloads" "K:\Downloads\"
xcopy /s /y /d /h /c "C:\Users\rls\Downloads" "D:\Downloads\"
xcopy /s /y /d /h /c "C:\USERS\RLS\Pictures" "K:\Pictures\"
xcopy /s /y /d /h /c "C:\USERS\RLS\Pictures" "D:\Pictures\"
rem xcopy /s /y /d /h /c "C:\USERS\RLS\Pictures" "M:\Pictures\"
xcopy /s /y /d /h /c "C:\USERS\RLS\Richie" "K:\Richie\"
rem xcopy /s /y /d /h /c "C:\USERS\RLS\Richie" "D:\Richie\"
xcopy /s /y /d /h /c "C:\Users\rls\Favorites" "K:\Favorites\"
xcopy /s /y /d /h /c "C:\Users\rls\Favorites" "D:\Favorites\"
Xcopy /s /y /d /h /c "C:\Users\rls\Favorites" "M:\Favorites\"
xcopy /s /y /d /h /c "C:\Users\rls\Setup" "K:\Setup\"
xcopy /s /y /d /h /c "C:\Users\rls\Setup" "D:\Setup\"
xcopy /s /y /d /h /c "C:\Users\rls\Setup" "K:\ABackup\Setup\"


I hope I cleared this up so you can understand what I want?

Have a good day,
RScotti

remove "nospam" in order to email me.
 
R

RScotti

Which "above command"? I am unable to see one!
I don't think it is a "command" I believe it is a string or something like that in my bat file.

This is what I see now in the output CMD window
C:\users\rls\Agent\Data\00000002.IDX

This is what I want to see in the output CMD window.
C:\users\rls\Agent\Data\00000002.IDX D:\Agent\Data\00000002.IDX

I am not experienced in these things so I don't know if I am using the right wording or terminology but you should see
from my information what I want?

Have a good day,
RScotti

remove "nospam" in order to email me.
 
P

Pegasus \(MVP\)

RScotti said:
I don't think it is a "command" I believe it is a string or something like
that in my bat file.

This is what I see now in the output CMD window
C:\users\rls\Agent\Data\00000002.IDX

This is what I want to see in the output CMD window.
C:\users\rls\Agent\Data\00000002.IDX D:\Agent\Data\00000002.IDX

I am not experienced in these things so I don't know if I am using the
right wording or terminology but you should see
from my information what I want?

Have a good day,
RScotti

remove "nospam" in order to email me.

When you open a Command Prompt then the prompt reflects
the current "working directory". Here are some examples:
c:\>
c:\Documents and Settings\Agent\My Documents>
C:\users\rls\Agent\Data\00000002.IDX>

You say that you want to see something like
C:\users\rls\Agent\Data\00000002.IDX D:\Agent\Data\00000002.IDX
and you say that the first string should be the source, the other
the destination. This makes no sense. Assume that you're standing
at the entrance of the Empire State Building. Your "working
directory" would now be
C:\Empire State Building\Front Entrance>

Since you're not moving, how can there be a destination?

If you're running a batch file then it would be a good idea
to post your batch file in order to clarify your question.
 
A

Andrew McLaren

To show the full source and destination, add a /f paramter to the XCOPY
command. For example, change:

xcopy /s /y /d /h /c "C:\users\rls\Agent" "K:\Agent\"

to

xcopy /s /y /d /h /c /f "C:\users\rls\Agent" "K:\Agent\"

Repeat for each of the xcopy commands.

At a command prompt, type "xcopy /?" to see all the options for the xcopy
command.

Hope it helps,
 
R

RScotti

When you open a Command Prompt then the prompt reflects
the current "working directory". Here are some examples:
c:\>
c:\Documents and Settings\Agent\My Documents>
C:\users\rls\Agent\Data\00000002.IDX>

You say that you want to see something like
C:\users\rls\Agent\Data\00000002.IDX D:\Agent\Data\00000002.IDX
and you say that the first string should be the source, the other
the destination. This makes no sense. Assume that you're standing
at the entrance of the Empire State Building. Your "working
directory" would now be
C:\Empire State Building\Front Entrance>

Since you're not moving, how can there be a destination?

If you're running a batch file then it would be a good idea
to post your batch file in order to clarify your question.
I already gave it to you at 1:56 PM today BUT Andrew answered my question. I guess he understood what I meant.
To show the full source and destination, add a /f paramter to the XCOPY
command. For example, change:

xcopy /s /y /d /h /c "C:\users\rls\Agent" "K:\Agent\"

to

xcopy /s /y /d /h /c /f "C:\users\rls\Agent" "K:\Agent\"

Repeat for each of the xcopy commands.

At a command prompt, type "xcopy /?" to see all the options for the xcopy
command.

Hope it helps,

Have a good day,
RScotti

remove "nospam" in order to email me.
 
R

RScotti

Andrew thank you so very much that is exactly what I want to do. You seem to understand what I meant while others
didn't.
Thanks again, I really owe you for this!
To show the full source and destination, add a /f paramter to the XCOPY
command. For example, change:

xcopy /s /y /d /h /c "C:\users\rls\Agent" "K:\Agent\"

to

xcopy /s /y /d /h /c /f "C:\users\rls\Agent" "K:\Agent\"

Repeat for each of the xcopy commands.

At a command prompt, type "xcopy /?" to see all the options for the xcopy
command.

Hope it helps,

Have a good day,
RScotti

remove "nospam" in order to email me.
 
P

Paul Randall

RScotti said:
I don't think it is a "command" I believe it is a string or something like
that in my bat file.

This is what I see now in the output CMD window
C:\users\rls\Agent\Data\00000002.IDX

This is what I want to see in the output CMD window.
C:\users\rls\Agent\Data\00000002.IDX D:\Agent\Data\00000002.IDX

I am not experienced in these things so I don't know if I am using the
right wording or terminology but you should see
from my information what I want?

Have a good day,
RScotti

remove "nospam" in order to email me.

As the xcopy command copies a bunch of files, I believe it only displays the
source file path when it starts to copy each file. I don't believe there is
any switch that forces it to display the path to which that file is being
copied. I could be wrong.

-Paul Randall
 
R

RScotti

As the xcopy command copies a bunch of files, I believe it only displays the
source file path when it starts to copy each file. I don't believe there is
any switch that forces it to display the path to which that file is being
copied. I could be wrong.

-Paul Randall
Paul,
The /f switch does do that as Andrew showed me in this thread. See the switches in xcopy /? @ CMD.

Have a good day,
RScotti

remove "nospam" in order to email me.
 
C

Chuck B

To be fair, while I understood what you wanted, it wasn't due to the clairty
of your question.

What you wanted was for the xcopy command to be more verbose when it
executed. The question you asked was nowhere near that specific.
 
R

RScotti

Hi Chuck,
I am sorry but I tried to explain the best I could and I did show an example of what I was looking for.So I thought I
did get my message across.
Your statement is very true on what I did want but I am not the literate I guess. :(
I guess your also Andrew?


To be fair, while I understood what you wanted, it wasn't due to the clairty
of your question.

What you wanted was for the xcopy command to be more verbose when it
executed. The question you asked was nowhere near that specific.

Have a good day,
RScotti

remove "nospam" in order to email me.
 
R

RScotti

Hi Pegasus,
I am sorry that I could not explain to you on what I did want but I am not the literate I guess. :(
I did submit the entire bat file but you chose to snip it and I thought I gave you a good example of what I was looking
for but I guess I didn't and I am very sorry for that.
I did try my best but that wasn't good enough.

When you open a Command Prompt then the prompt reflects
the current "working directory". Here are some examples:
c:\>
c:\Documents and Settings\Agent\My Documents>
C:\users\rls\Agent\Data\00000002.IDX>

You say that you want to see something like
C:\users\rls\Agent\Data\00000002.IDX D:\Agent\Data\00000002.IDX
and you say that the first string should be the source, the other
the destination. This makes no sense. Assume that you're standing
at the entrance of the Empire State Building. Your "working
directory" would now be
C:\Empire State Building\Front Entrance>

Since you're not moving, how can there be a destination?

If you're running a batch file then it would be a good idea
to post your batch file in order to clarify your question.

Have a good day,
RScotti

remove "nospam" in order to email me.
 
R

RScotti

Thanks Andrew,
I just didn't understand why he posted that if he wasn't you?
I did try to explain what I meant Honest!Sorry other people couldn't understand what I wanted. I did show examples along
with my bat file.
Poster "Chuck B" isn't me. He's someone else.

Have a good day,
RScotti

remove "nospam" in order to email me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top