Jump to content
Macro Express Forums

Moving Files To Cd Sized Sub Directories


Recommended Posts



I've been working on a macro to put all ZIP and RAR files from a chosen directory into newly created subdirectories of a max size.


However, my variables %N5% and %N6% are always zero (these represent file size and directory size)


Can anyone help me out I wonder?


There are 2 prompts at the beginning, a Root folder selection to look for ZIP and RAR files, and a max size for each subdirectory before another one is created.





Here is the macro...


<REM2:Choose a root folder><TVAR2:01:10:Choose Directory to Archive><REM2:><REM2:N8 is the max size for a directory><IVAR2:08:02:FHow many Megabytes? (Standard DVD = 4600)FFCenter:Center><NMVAR:03:08:1:0000008:2:1024000><REM2:><REM2: Each file in chosen folder is assigned to the variable T2 in turn><REM2:><IVAR2:01:01:1><REP3:07:000001:000001:0002:0:01:%T1%><REM2:Create a folder called 1 then 2 then 3 etc><IFOTH:10:1:%T1%\%N1%><DOFILE:02:NN:%T1%\%N1%>><ENDIF><REM2:--><REM2:N5 is file size><REM2: N6 is sub directory size><REM2:><VFFILE:1:F:1:F:1:F:1:T:3:%T2%><IFVAR2:1:03:1:T.ZIP><OR><IFVAR2:1:03:1:T.rar><REM2:><IVAR2:05:05:%T2%><REM2:><TBOX4:T:1:CenterCenter000278000200:000:%N5% = file size

%N6% = folder size><NMVAR:01:06:1:0000006:1:0000005><REM2: If the file would take the sub directory above the DVD/CD size then break><IFVAR2:5:06:4:N8><NMVAR:08:01:0:0000001:0:0000000><ELSE><DOFILE:07:NN:%T2%>%T1%\%N1%><ENDIF><ENDIF><ENDREP>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...