Computer Help forum

General discussion

Batch File with a date and time stamp on XP O/S

by 10finch46 / December 25, 2008 1:57 AM PST

I would like to copy files with a date and time stamp, but not have the computer keep asking if the file being copied is a file or directory

Xcopy C:\AAA\*.Txt/y C:\BBB\

Should the /y have no space or have a space, as in either case I keep being asked asking if the file being copied is a file or directory

Your help will be appreciated.

Discussion is locked
You are posting a reply to: Batch File with a date and time stamp on XP O/S
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Batch File with a date and time stamp on XP O/S
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Why not add the /i switch?
by R. Proffitt Forum moderator / December 25, 2008 5:52 AM PST

If the destination does not exist, and you are copying more than one file, this switch assumes that the destination is a folder.

Collapse -
As Bob notes, using the /i switch ...
by Edward ODaniel / December 25, 2008 9:37 AM PST

should work but since you specifically referenced the /y switch it should be noted that you are trying to use in in the wrong place. The /y switch (like the rest of the switches) should be used AFTER the source and destination have been indicated --

xcopy Source [Destination] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g] [/d[:mm-dd-yyyy]] [/s [/e]] [/t] [/k] [/r] [/h] [{/a|/m}] [/n] [/o] [/x] [/exclude:file1[+[file2]][+[file3]] [{/y|/-y}] [/z]

Collapse -
by 10finch46 / December 25, 2008 10:31 AM PST

I am using the switch after the destination and this works.

Thank you

Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?