Jason, thank you. I see the gist of your approach; but being even less versed in vbscript I'll try this out a bit later.
Appreciate your assistance, Bruce > -------- Original Message -------- > Subject: [RBASE-L] - Re: Data File Relocation Routine > From: Jason Kramer <[email protected]> > Date: Wed, March 07, 2012 11:49 am > To: [email protected] (RBASE-L Mailing List) > > > Bruce, > Since you already have all the information in Excel, you can do the work > with VBA. > > Option Explicit > > Public Sub MoveSort() > Dim fso As Object > Dim iLoop As Integer, iSNCol As Integer, iFileSetCol As Integer > > iSNCol = 1 > iFileSetCol = 2 > Set fso = CreateObject("scripting.filesystemobject") > > For iLoop = 2 To 11 > fso.movefile "d:Common\" + CStr(Cells(iLoop, iSNCol).Value) + ".*", > "d:humpty\" + Cells(iLoop, iFileSetCol).Value > Next iLoop > > MsgBox "All files moved.", vbOKOnly, "DONE" > End Sub > > Make sure to set iSNCol and iFileSetCol to the be correct column for your > worksheet. These have to be numbers, so count over, don't use the letter (A > = 1, D = 4, etc...). Also, set the loop start and stop to be the first and > last row, make sure you don't have blank lines in the range of rows, and > adjust the movefile line as necessary to account for your file\folder > structure. > This routine assumes that all File_SNs are unique. > If you want an example, let me know and I can send it to you directly. > > Thanks, > Jason > Jason Kramer > University Archives and Records Management > 002 Pearson Hall > (302) 831 - 3127 (voice) > (302) 831 - 6903 (fax) > On 3/7/2012 1:07 PM, Bruce Chitiea wrote: Jason, thank you. > > More exactly: > > 1. R:Base Table: > > file_sn integer > file_set text 1 > > file_sn file_set > 10001 a > 10002 a > 10003 b > 10004 c > > 2. Source Folder: > d:\common - containing serialized file entries in format > <file_sn>.<filename>.<ext>. <filename> does NOT include the file_set > tag. The <file_sn> uniquely identifies the file. > > 3. Target Folders: > d:\humpty\a > d:\humpty\b > d:\humpty\c > d:\humpty\d > > 4. Wish to MOVE files from d:\common to d:\humpty\x=[ a b c d ] - to > prevent further duplication. > > 5. Excel file was used to manipulate the file list, and generate a > series of file-content-and-meaning flags. These become 'metadata' for > further file manipulation outside of this process. > > MTIA > > Bruce > > ******************************************************* > > -------- Original Message -------- > Subject: [RBASE-L] - Re: Data File Relocation Routine > From: Jason Kramer <[email protected]> > Date: Wed, March 07, 2012 8:27 am > To: [email protected] (RBASE-L Mailing List) > > > Bruce, > If I understand correctly, you have a table that looks like this: > file_sn file_set > 10001 a > 10002 a > 10003 b > 10004 c > > A single directory with all files in it, and directories named a,b,c,d > that you want to copy (or move) the files into, and an Excel file with the > same information? Is that correct? > Thanks, > Jason > Jason Kramer > University Archives and Records Management > 002 Pearson Hall > (302) 831 - 3127 (voice) > (302) 831 - 6903 (fax) > On 3/7/2012 11:20 AM, Bruce Chitiea wrote: All: > > RBASE 91_64 > 9.1.5.20214 > have PluginPowerPak 91_64 > Windows 7 > > GOAL > Distribute classed sets of data files from a common folder to their > respective set folders. > > BACKGROUND > > For a client with severe data-file duplication and > file-content-identification issues ranging across several thousand > files, I've: > > - created a backup working set of those files > > - pre-pended a 5-digit serial number to each file-copy into the format: > xxxxx.filename.ext > > - aggregated all files into a common folder > - successfully parsed the folder's file list into text fields: > xxxxx > filename > ext > filesize > datestamp > > - processed these in Excel to identify duplication and content-meaning, > and to class files into four sets: > [ a b c d ] > > - successfully Gateway'd the file serial number and file set identifier > into a two-column R:Base table: > file_sn [ 10001,10002...2nnnn ] > file_set [ a b c d ] > > - created four empty file folders, each reserved for one file class > > NEED > > I'm thinking the 'file_sn' and 'file_set' values are sufficient input to > a process that 'walks' the common file list and performs the > distribution. I have no such routine and I'm SO FAR behind the 8-ball on > this job ... What's the best way to handle this? > > MTIA > > Bruce Chitiea > SafeSectors, Inc.

