PC Review


Reply
Thread Tools Rate Thread

Bat file question

 
 
RScotti
Guest
Posts: n/a
 
      28th Oct 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
 
      28th Oct 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
 
      28th Oct 2007

"RScotti" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
 
      28th Oct 2007

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

>
>"RScotti" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> 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
 
      28th Oct 2007
On Sun, 28 Oct 2007 11:10:37 -0400, "Poprivet" <(E-Mail Removed)> 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
 
      28th Oct 2007

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

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

"RScotti" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sun, 28 Oct 2007 19:09:20 +0100, "Pegasus \(MVP\)" <(E-Mail Removed)>
> wrote:
>
>>
>>"RScotti" <(E-Mail Removed)> wrote in message
>>news:(E-Mail Removed)...
>>>
>>> On Sun, 28 Oct 2007 16:46:36 +0100, "Pegasus \(MVP\)" <(E-Mail Removed)>
>>> wrote:
>>>
>>>>
>>>>"RScotti" <(E-Mail Removed)> wrote in message
>>>>news:(E-Mail Removed)...
>>>>> 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
 
      28th Oct 2007
"RScotti" <(E-Mail Removed)> 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
 
      28th Oct 2007
On Sun, 28 Oct 2007 22:31:12 +0100, "Pegasus \(MVP\)" <(E-Mail Removed)> wrote:

>
>"RScotti" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> On Sun, 28 Oct 2007 19:09:20 +0100, "Pegasus \(MVP\)" <(E-Mail Removed)>
>> wrote:
>>
>>>
>>>"RScotti" <(E-Mail Removed)> wrote in message
>>>news:(E-Mail Removed)...
>>>>
>>>> On Sun, 28 Oct 2007 16:46:36 +0100, "Pegasus \(MVP\)" <(E-Mail Removed)>
>>>> wrote:
>>>>
>>>>>
>>>>>"RScotti" <(E-Mail Removed)> wrote in message
>>>>>news:(E-Mail Removed)...
>>>>>> 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
Rate This Thread
Rate This Thread:

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
E-mail this file (File and folders tasks) - Resize question DAG Windows XP General 3 21st Dec 2007 10:09 AM
ASP.NET app question about config file location or DLL file and physical tiers Klonk Microsoft Dot NET 0 9th Nov 2005 08:09 PM
My Commander has a PST File that is 1.6 GB. My question is the max size of a file for the Windows OS? =?Utf-8?B?SmFzb24gQ29saWFu?= Microsoft Windows 2000 3 11th Mar 2004 02:32 PM
Re: Question on relative file addressing of sound file Bob Marley Microsoft Powerpoint 2 15th Sep 2003 05:36 AM
Re: Question on relative file addressing of sound file Ron Sommer Microsoft Powerpoint 0 1st Aug 2003 10:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:27 AM.