Page 1 of 1 1
Topic Options
#72262 - 2002-12-19 02:28 AM Copy file to a folder based on disk size
Jasniel Offline
Getting the hang of it

Registered: 2000-04-08
Posts: 77
Hi,
How can I move a folder with, 3 GB of files, to different folders based on 600 MB each. Another word - if the first folder reach 600 MB it will go to the second folder.

Top
#72263 - 2002-12-19 02:54 AM Re: Copy file to a folder based on disk size
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I guess my approach would be to inventory the source directory and place the file names into an array. Next start copying the files and sum the file sizes as they are copied. Change the destination directory when your theshold is reached.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#72264 - 2002-12-19 03:37 AM Re: Copy file to a folder based on disk size
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Use any of the DIR UDFs posted in the UDF Forum to enumerate the files. However, depending on how many files you have to copy this will be a very inefficient and slow way to accomplish this.

Would you mind providing use the big picture as I suspect you're not telling the whole story.

Why not copy the files manually? Should be faster than writing a script, especially if it's just a one-time deal.
_________________________
There are two types of vessels, submarines and targets.

Top
#72265 - 2002-12-19 04:05 AM Re: Copy file to a folder based on disk size
Jasniel Offline
Getting the hang of it

Registered: 2000-04-08
Posts: 77
Hi,
Reason for doing so is that I have a folder which the user used to update bitmaps files in and the size of this folder is more than 3 GB.
I have to do a secondary backup to CD once a month and if the kix script will be able to copy to various folders, eg Disk1, Disk2, etc and all I need is to cut and paste disk1 folder into the CD.

Top
#72266 - 2002-12-19 04:10 AM Re: Copy file to a folder based on disk size
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
In this case it might be easier to deploy disk quote software. Then limit the folders to e.g. 650MB. W. Quinn has a disk quote software package that will detect the creation of new folder and apply predetermined folder quotas.

You are looking more for a real-time monitoring software, KiXtart is not well suited for this.

I seem to remember that we had a similar discussion within the last three months about a similar case of organizing huge amounts of images in folders. You might want to search for this thread.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.113 seconds in which 0.091 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org