#33441 - 2002-11-25 08:49 PM
Copy Based On FileDate
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
I did a search on the board but couldnt find what I was looking for but I know this must be a common issue so my searching must just stink.
Anyways what I want to do is move files based on the creation date of the file... I want to use SerialDate() to move files based on date-60 days. I understand the part about performing the math to get $COPYDATEbut I dont understand how to say something to the effect of ....
code:
COPY *.* (WHERE DATE IS BEFORE $COPYDATE)
Any help is appreciated..
Thanks
_________________________
Austin Henderson
|
Top
|
|
|
|
#33443 - 2002-11-25 09:51 PM
Re: Copy Based On FileDate
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
Yeah I thought of using the xcopy method but cant use that because it copied files after date specified... I want to move files before a certain date.. maybe I am thinking the wrong way but I dont see how the xcopy solution will work.
Thank you
_________________________
Austin Henderson
|
Top
|
|
|
|
#33445 - 2002-11-25 10:06 PM
Re: Copy Based On FileDate
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
not much... UDF just did not pull in my search because it does not have a very detailed description.
You rock thank you for the help.
_________________________
Austin Henderson
|
Top
|
|
|
|
#33450 - 2002-11-26 09:59 AM
Re: Copy Based On FileDate
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11625
Loc: CA
|
Because any KiXtart script will be SLOW compared to most 3rd party utils.
If you're only doing a small directory KiXtart UDFs are fine, but if you're looking at manipulating thousands of files on a 200GB volume, then KiXtart is not the program to be using. This is also assuming you're looking for something either real cheap or preferrably free.
Maybe take a look at some of these for example.
File Manipulation Utilities
More file managers
Even More File Managers [ 26. November 2002, 10:04: Message edited by: NTDOC ]
|
Top
|
|
|
|
#33451 - 2002-11-26 02:46 PM
Re: Copy Based On FileDate
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
Thanks for the help.. I will look into all of these... I am talking about 60 folders that I wish to move with < 4 GB of data.. I think I ill use the kix options but will certainly look into the 3rd party utils.
Thanks again
_________________________
Austin Henderson
|
Top
|
|
|
|
#33454 - 2002-11-26 03:19 PM
Re: Copy Based On FileDate
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
So you are saying use the getfileage() to determine if the file can be archived? then set the bit on those files... then use xcopy to move them?
Am I following you?
Thanks
_________________________
Austin Henderson
|
Top
|
|
|
|
#33460 - 2002-11-26 10:11 PM
Re: Copy Based On FileDate
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
I am thinking of using the gerfileage() but I have a problem where I have a directory and I want to enumerate a listing of all the folders in that directory.. then I need to get the age of those folders.. then move them based on that age.. well the only way I can think of doing this is by outputting to a temp file a dir listing then reading from that file for age.. is there a better way?
Thanks
_________________________
Austin Henderson
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 229 anonymous users online.
|
|
|