Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Bat file question

Reply
Thread Tools Display Modes

Bat file question

 
 
RScotti
Guest
Posts: n/a

 
      10-28-2007
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.

 
Reply With Quote
 
 
 
 
Poprivet
Guest
Posts: n/a

 
      10-28-2007
RScotti wrote:
> 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.


 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a

 
      10-28-2007

"RScotti" <> wrote in message
news:...
> 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.


 
Reply With Quote
 
RScotti
Guest
Posts: n/a

 
      10-28-2007

On Sun, 28 Oct 2007 16:46:36 +0100, "Pegasus \(MVP\)" <> wrote:

>
>"RScotti" <> wrote in message
>news:.. .
>> 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.
>


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.

 
Reply With Quote
 
RScotti
Guest
Posts: n/a

 
      10-28-2007
On Sun, 28 Oct 2007 11:10:37 -0400, "Poprivet" <> wrote:

>RScotti wrote:
>> 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.
>

How do I do that?

Have a good day,
RScotti

remove "nospam" in order to email me.

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a

 
      10-28-2007

"RScotti" <> wrote in message
news:...
>
> On Sun, 28 Oct 2007 16:46:36 +0100, "Pegasus \(MVP\)" <>
> wrote:
>
>>
>>"RScotti" <> wrote in message
>>news:. ..
>>> 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.
>>

>
> Hi Pegasus,
> Not sure I understand you.The above command is from the bat file <snip>


Which "above command"? I am unable to see one!


 
Reply With Quote
 
RScotti
Guest
Posts: n/a

 
      10-28-2007
On Sun, 28 Oct 2007 19:09:20 +0100, "Pegasus \(MVP\)" <> wrote:

>
>"RScotti" <> wrote in message
>news:.. .
>>
>> On Sun, 28 Oct 2007 16:46:36 +0100, "Pegasus \(MVP\)" <>
>> wrote:
>>
>>>
>>>"RScotti" <> wrote in message
>>>news: ...
>>>> 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.
>>>

>>
>> Hi Pegasus,
>> Not sure I understand you.The above command is from the bat file <snip>

>
>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.

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a

 
      10-28-2007

"RScotti" <> wrote in message
news:...
> On Sun, 28 Oct 2007 19:09:20 +0100, "Pegasus \(MVP\)" <>
> wrote:
>
>>
>>"RScotti" <> wrote in message
>>news:. ..
>>>
>>> On Sun, 28 Oct 2007 16:46:36 +0100, "Pegasus \(MVP\)" <>
>>> wrote:
>>>
>>>>
>>>>"RScotti" <> wrote in message
>>>>news: m...
>>>>> 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.
>>>>
>>>
>>> Hi Pegasus,
>>> Not sure I understand you.The above command is from the bat file <snip>

>>
>>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.
>


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.


 
Reply With Quote
 
Andrew McLaren
Guest
Posts: n/a

 
      10-28-2007
"RScotti" <> wrote ...
>>xcopy /s /y /d /h /c "C:\users\rls\Agent" "K:\Agent\"



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,

--
Andrew McLaren
amclar (at) optusnet dot com dot au


 
Reply With Quote
 
RScotti
Guest
Posts: n/a

 
      10-28-2007
On Sun, 28 Oct 2007 22:31:12 +0100, "Pegasus \(MVP\)" <> wrote:

>
>"RScotti" <> wrote in message
>news:.. .
>> On Sun, 28 Oct 2007 19:09:20 +0100, "Pegasus \(MVP\)" <>
>> wrote:
>>
>>>
>>>"RScotti" <> wrote in message
>>>news: ...
>>>>
>>>> On Sun, 28 Oct 2007 16:46:36 +0100, "Pegasus \(MVP\)" <>
>>>> wrote:
>>>>
>>>>>
>>>>>"RScotti" <> wrote in message
>>>>>news: om...
>>>>>> 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.
>>>>>
>>>>
>>>> Hi Pegasus,
>>>> Not sure I understand you.The above command is from the bat file <snip>
>>>
>>>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.
>>

>
>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,
>
>--
>Andrew McLaren


Have a good day,
RScotti

remove "nospam" in order to email me.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kill file question Seeker Windows Vista General Discussion 32 04-15-2008 03:42 AM
another paging file question... carl feredeck Windows Vista General Discussion 5 07-22-2007 01:49 AM
UAC and File Compatability Question. John Windows Vista Security 0 07-10-2007 08:05 PM
File security question wynand32 Windows Vista Security 4 01-18-2007 01:01 AM
File Question Smoke286 Windows Vista File Management 0 06-27-2006 12:49 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59