Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Backup vs2010 project folder
#1
i am trying to write a small macro which does zip my current project and upload it to my ftp server.
what is the best way to exclude some file extensions not to be included in the zip for upload?

Macro pm32ftp
Code:
Copy      Help
str folder = "E:\Projektmanager\Projektmanager 3"
str warnings
str zipname.timeformat("E:\Projektmanager\{MMM-dd-yyyy}-{HH'h'mm}_pm3.zip")

zip zipname folder 0 warnings


file extensions to be ignored are pdb,vhost.exe,vhost.exe.config,vhost.exe.config and maybe the obj folder.
so i guess i need to generate a file list with exclusions.

thanks
pi
#2
With QM I see two ways.

1. Enumerate files with foreach FE_Dir, add matching files to a list, pass the list to zip.

2. GetFilesInFolder with regular expression that excludes some files. For example, this rx excludes files that end with .cpp or .h: "(?i)(?<!\.cpp|\.h)$". Or get all, and then remove some files from the array. Then convert array to str and pass to zip.


Forum Jump:


Users browsing this thread: 1 Guest(s)