Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: xcopy properties  (Read 2493 times)

0 Members and 1 Guest are viewing this topic.

cvp

  • Guest
xcopy properties
« on: November 20, 2007, 01:32:26 AM »
I want to xcopy a directory with all subfolders & files in it. I'm using xcopy sourec destination /Y/I/E/Q/F.
I know it worked before , but now suddenly doesn't copy the subfolders in the directory. It copies the files in it though. Plz help!!!

Thanks
CVP

nickc1976



    Intermediate

    Re: xcopy properties
    « Reply #1 on: November 20, 2007, 02:10:35 AM »
    Get rid of the /q. /f and /q conflict with each other. use xcopy /? to get a list of the available switches
    http://www.pc-citadel.com - PC and Laptop repairs upgrades and customization

    cvp

    • Guest
    Re: xcopy properties
    « Reply #2 on: November 20, 2007, 06:09:49 AM »
    Hi Nick

    The problem was beacuse source location was not specified by me correctly.Silly me:)
    I think I have another silly issue. This used to work all the while but accidently the .bat file got deleted & I had to create a new one. I want to rename the file to the system date. I'm using:
    for /f "tokens=5 delims=/ " %%d in ("%date%") do rename "C:\data" %%e-%%f-%%g

    Any idea why the file isn't renamed?
    Help is much appreciated.

    Regards
    CVP

    Spoiler



      Specialist

      Thanked: 50
    • Experience: Beginner
    • OS: Windows XP
    Re: xcopy properties
    « Reply #3 on: November 20, 2007, 07:58:37 AM »
    Try this...

    For /f "tokens=2-4 delims=/ " %%a in ('date/t') do (
    Set month=%%a
    Set day=%%b
    Set year=%%c
    )
    REN C:\YOUR_PATH\YOUR_FILE.TXT NEW_FILE_NAME%year%%month%%day%.TXT

    Whenever I watch TV and I see those poor starving kids all over the world, I can't help but cry. I mean I would love to be skinny like that, but not with all those flies and death and stuff." - Mariah Carey, Pop Singer

    cvp

    • Guest
    Re: xcopy properties
    « Reply #4 on: November 20, 2007, 09:51:36 PM »
    Thank you Spoiler. It worked but I wasn't able to understand what 'date/t' does...

    I'm trying to delete the files older than a specific time. How do I go about this?

    Thanks & Regards
    CVP