Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Something is wrong with my Bat file?

Reply
Thread Tools Display Modes

Something is wrong with my Bat file?

 
 
RScotti
Guest
Posts: n/a

 
      06-04-2007
Hi,
This is a portion of my bat file. The ones with the > are the questioned ones.

xcopy /s /y /d /h /c "C:\users\rls\Agent" "M:\Agent\"
>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "D:\*.*" My D:\ partition
>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "G:\*.*" My external HD
>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "M:\*.*" My 8 GB Flash drive

xcopy /s /y /d /h /c "C:\Users\rls\Documents" "G:\Documents\"

When I run this I get and error message in the CMD prompt.
>0 File(s) copied
>C:\users\rls\RLS's Calendar.ics
>C:\users\rls\AppData\Local\Microsoft\Windows Calendar\Calendars\RLS's Calendar.ics
>2 File(s) copied
>C:\users\rls\RLS's Calendar.ics
>C:\users\rls\AppData\Local\Microsoft\Windows Calendar\Calendars\RLS's Calendar.ics
>2 File(s) copied
>C:\users\rls\RLS's Calendar.ics
>C:\users\rls\AppData\Local\Microsoft\Windows Calendar\Calendars\RLS's Calendar.ics
>File creation error - Incorrect function.
>
>Unable to create directory - M:\Cookies
>2 File(s) copied


For some reason my M:\ flash drive is trying to create a cookies folder and get the error Incorrect function.
The cookies folder is not in the same folder as the calendar and don't understand the Incorrect function.

There is only one file being created on these disks so I don't know why it is coping two files as it says?
This file IS in BOTH locations. I only put it in the RLS folder so I guess the program did the other one.

What do I have to change to stop this in my Bat file?

Have a good day,
RScotti

remove "nospam" in order to email me.

 
Reply With Quote
 
 
 
 
Pegasus
Guest
Posts: n/a

 
      06-04-2007

"RScotti" <> wrote in message
news:...
> Hi,
> This is a portion of my bat file. The ones with the > are the questioned
> ones.
>
> xcopy /s /y /d /h /c "C:\users\rls\Agent" "M:\Agent\"
>>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "D:\*.*" My D:\
>>partition
>>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "G:\*.*" My
>>external HD
>>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "M:\*.*" My 8 GB
>>Flash drive

> xcopy /s /y /d /h /c "C:\Users\rls\Documents" "G:\Documents\"
>
> When I run this I get and error message in the CMD prompt.
>>0 File(s) copied
>>C:\users\rls\RLS's Calendar.ics
>>C:\users\rls\AppData\Local\Microsoft\Windows Calendar\Calendars\RLS's
>>Calendar.ics
>>2 File(s) copied
>>C:\users\rls\RLS's Calendar.ics
>>C:\users\rls\AppData\Local\Microsoft\Windows Calendar\Calendars\RLS's
>>Calendar.ics
>>2 File(s) copied
>>C:\users\rls\RLS's Calendar.ics
>>C:\users\rls\AppData\Local\Microsoft\Windows Calendar\Calendars\RLS's
>>Calendar.ics
>>File creation error - Incorrect function.
>>
>>Unable to create directory - M:\Cookies
>>2 File(s) copied

>
> For some reason my M:\ flash drive is trying to create a cookies folder
> and get the error Incorrect function.
> The cookies folder is not in the same folder as the calendar and don't
> understand the Incorrect function.
>
> There is only one file being created on these disks so I don't know why it
> is coping two files as it says?
> This file IS in BOTH locations. I only put it in the RLS folder so I guess
> the program did the other one.
>
> What do I have to change to stop this in my Bat file?
>
> Have a good day,
> RScotti
>
> remove "nospam" in order to email me.
>


Instead of coding
>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "D:\*.*"

get rid of the leading arrow head and code like so:
xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "D:\*.*"

Get rid of the trailing wild cards in the target parameters.
When using wild cards, use them for the source parameter only,
if at all:
xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics\*.*" "D:\"

Check what hidden files you have in the source folder.

Check if you have a folder called "RLS's Calendar.ics" in the
target folder.

If all fails, clean out your target folder completely before
trying again.


 
Reply With Quote
 
RScotti
Guest
Posts: n/a

 
      06-04-2007
Hi Pagasus,
I was hoping to get you but didn't want to email you. I did all you suggestions except delete the target folder and it
did work except as I stated.
Please advise.

On Mon, 4 Jun 2007 15:58:51 +0200, "Pegasus" <> wrote:

>
>Instead of coding
>>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "D:\*.*"

>get rid of the leading arrow head and code like so:
>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "D:\*.*"

I only put the > in to show which file I was talking about it isn't in the bat file.

>Get rid of the trailing wild cards in the target parameters.
>When using wild cards, use them for the source parameter only,
>if at all:
>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics\*.*" "D:\"

Thanks. I did that.But this is a file not a folder? so I changed it to:
xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics "D:\Calendar.ics"
I don't know if that is the right syntax
or if "D:\Calendar.ics\" is right?
>Check what hidden files you have in the source folder.

I do have shortcuts to cookies in the source folder and a few others.
>Check if you have a folder called "RLS's Calendar.ics" in the
>target folder.

Yes I did have a cookies folder in my M:\source folder but don't remember putting it there. I just deleted it.
>If all fails, clean out your target folder completely before
>trying again.
>


It did work but it kept asking me if it was a file or a folder. How do I change that?
I used:
xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics "D:\Calendar.ics"

Have a good day,
RScotti

remove "nospam" in order to email me.

 
Reply With Quote
 
Pegasus
Guest
Posts: n/a

 
      06-04-2007
Trying to send me an EMail would not have gotten you
anywhere - the address you see here is ficticious.

Your original post is a bit vague, so let's try to be
more specific. Please confirm that you're stumbling
over this particular command:

xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "M:\"

If this is correct then please restate the problem you
think you have with it.


"RScotti" <> wrote in message
news:...
> Hi Pagasus,
> I was hoping to get you but didn't want to email you. I did all you
> suggestions except delete the target folder and it
> did work except as I stated.
> Please advise.
>
> On Mon, 4 Jun 2007 15:58:51 +0200, "Pegasus" <> wrote:
>
>>
>>Instead of coding
>>>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "D:\*.*"

>>get rid of the leading arrow head and code like so:
>>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "D:\*.*"

> I only put the > in to show which file I was talking about it isn't in the
> bat file.
>
>>Get rid of the trailing wild cards in the target parameters.
>>When using wild cards, use them for the source parameter only,
>>if at all:
>>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics\*.*" "D:\"

> Thanks. I did that.But this is a file not a folder? so I changed it to:
> xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics "D:\Calendar.ics"
> I don't know if that is the right syntax
> or if "D:\Calendar.ics\" is right?
>>Check what hidden files you have in the source folder.

> I do have shortcuts to cookies in the source folder and a few others.
>>Check if you have a folder called "RLS's Calendar.ics" in the
>>target folder.

> Yes I did have a cookies folder in my M:\source folder but don't remember
> putting it there. I just deleted it.
>>If all fails, clean out your target folder completely before
>>trying again.
>>

>
> It did work but it kept asking me if it was a file or a folder. How do I
> change that?
> I used:
> xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics "D:\Calendar.ics"
>
> Have a good day,
> RScotti
>
> remove "nospam" in order to email me.
>



 
Reply With Quote
 
RScotti
Guest
Posts: n/a

 
      06-04-2007
First of all I have your temp email address you gave me from before.
But wouldn't use it as I said.

I think I fixed the problem. I changed the location of the file to a folder called Calendar and that seemed to fix it.

>C:\users\rls\Calendar\RLS's Calendar.ics
>1 File(s) copied
>C:\users\rls\Calendar\RLS's Calendar.ics
>1 File(s) copied
>C:\users\rls\Calendar\RLS's Calendar.ics
>1 File(s) copied


On Mon, 4 Jun 2007 17:18:35 +0200, "Pegasus" <> wrote:

>Trying to send me an EMail would not have gotten you
>anywhere - the address you see here is ficticious.
>
>Your original post is a bit vague, so let's try to be
>more specific. Please confirm that you're stumbling
>over this particular command:
>
>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "M:\"
>
>If this is correct then please restate the problem you
>think you have with it.
>
>
>"RScotti" <> wrote in message
>news:.. .
>> Hi Pagasus,
>> I was hoping to get you but didn't want to email you. I did all you
>> suggestions except delete the target folder and it
>> did work except as I stated.
>> Please advise.
>>
>> On Mon, 4 Jun 2007 15:58:51 +0200, "Pegasus" <> wrote:
>>
>>>
>>>Instead of coding
>>>>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "D:\*.*"
>>>get rid of the leading arrow head and code like so:
>>>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics" "D:\*.*"

>> I only put the > in to show which file I was talking about it isn't in the
>> bat file.
>>
>>>Get rid of the trailing wild cards in the target parameters.
>>>When using wild cards, use them for the source parameter only,
>>>if at all:
>>>xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics\*.*" "D:\"

>> Thanks. I did that.But this is a file not a folder? so I changed it to:
>> xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics "D:\Calendar.ics"
>> I don't know if that is the right syntax
>> or if "D:\Calendar.ics\" is right?
>>>Check what hidden files you have in the source folder.

>> I do have shortcuts to cookies in the source folder and a few others.
>>>Check if you have a folder called "RLS's Calendar.ics" in the
>>>target folder.

>> Yes I did have a cookies folder in my M:\source folder but don't remember
>> putting it there. I just deleted it.
>>>If all fails, clean out your target folder completely before
>>>trying again.
>>>

>>
>> It did work but it kept asking me if it was a file or a folder. How do I
>> change that?
>> I used:
>> xcopy /s /y /d /h /c "C:\users\rls\rls's Calendar.ics "D:\Calendar.ics"
>>
>> Have a good day,
>> RScotti
>>
>> remove "nospam" in order to email me.
>>

>


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
Wrong file owner set on new files and folders Jeffrey Windows Vista General Discussion 1 03-13-2008 03:38 PM
copying a file creates the wrong file ! Vincent Windows Vista File Management 2 09-11-2007 05:41 PM
Search for file type takes hours, & finds files on wrong drive. chrispy Windows Vista File Management 4 08-27-2007 10:57 PM
File counts are wrong..... Warwick Webb Windows Vista File Management 1 09-29-2006 01:09 PM
File count wrong........... Warwick Webb Windows Vista File Management 0 09-29-2006 12:47 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