Home / Microsoft / Microsoft DOS / Help with creating this Batch file
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: Help with creating this Batch file  (Read 499 times)
ItalianOnEdge
Topic Starter
Rookie



Posts: 14


« on: October 28, 2009, 06:17:21 PM »

cd\
md c:\archive
xcopy /c c:\test c:\archive /d:10-26-09
compact /c c:\archive

This is the batch file I been working on. I have gotten it to do the oppisite I want it to do. Can someone help me get it to move only the files that are older 2 days. This command copys the files that are after the date above. So I need help getting them to copy and move the files that are older then two days without providing the actual date. So please help me. If there is a way to zip the the files and move them that will help me greatly also. I want to show the teacher that this is possible cause he don't think it is possible that i will figure it out. But I cant do this alone. I not really versed in this style coding.
IP logged
billrich
Guest
« Reply #1 on: November 01, 2009, 09:15:05 AM »

I could not get the batch file to work.

I suggest nothing.

Good Luck



« Last Edit: November 01, 2009, 11:14:14 PM by billrich » IP logged
billrich
Guest
« Reply #2 on: November 01, 2009, 09:30:00 AM »

I could not get the batch file to work.

Bill

I do not suggest you use it.
« Last Edit: November 01, 2009, 11:11:29 PM by billrich » IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #3 on: November 01, 2009, 05:39:53 PM »

for deleting files older than blah date, that's one extremely slow batch script.
IP logged

Geek-9pm
Sage



Thanked: 327
Posts: 8,050

Computer: Specs
Experience: Familiar
OS: Windows XP


Geek After Dark

« Reply #4 on: November 01, 2009, 05:51:44 PM »

for deleting files older than blah date, that's one extremely slow batch script.

So are you wanting to say the files will be too old by the time the batch gets to the end? LOL!
:||x

Which brings up an issue. Anytime you want to find something that is exactly N hours, days, months old,  you will have a logical failure. From the time the program starts until it ends there may be a probability that some file will fall out of the time frame. This is an ERROR IN LOGIC.
IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #5 on: November 01, 2009, 06:05:20 PM »

thanks for that joke, but no, its definitely not what i meant.
IP logged

Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / Help with creating this Batch file « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.07 seconds with 21 queries.