zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
114 stars 86 forks source link

upload dir-to-pds | dir-to-uss : add a filter for selection of local files #850

Closed FALLAI-Denis closed 1 year ago

FALLAI-Denis commented 4 years ago

The upload / dir-to-pds | dir-to-uss feature uploads local files from a directory to a PDS file on z/OS or an USS directory.

All the files of the local directory are processed, whereas one might wish to process only certain files, in particular those having a particular extension, or responding to a selection mask.

Example:

zowe zos-files upload dir-to-pds "mixedfolder" "ibmuser.copycob" --ext ".cpy"
zowe zos-files upload dir-to-pds "mixedfolder" "ibmuser.cobol"   --ext ".cbl"
zowe zos-files upload dir-to-pds "mixedfolder" "ibmuser.copycob" --filter "*.cpy"
zowe zos-files upload dir-to-pds "mixedfolder" "ibmuser.cobol"   --filter "*.cbl"
zowe zos-files upload dir-to-pds "mixedfolder" "ibmuser.xx.copycob" --filter "xx*.cpy"
zowe zos-files upload dir-to-pds "mixedfolder" "ibmuser.xx.cobol"   --filter "xx*.cbl"

For a selection by a filter, it is necessary to define wildcards, which could be the same as those of the ISPF filters:

TUTORIAL --- MEMBER SELECTION LISTS - PATTERN MATCHING (continued) --- TUTORIAL
COMMAND ===>                                                                   

  The % character can be used to match more than one member name.  In order    
  for a member name to match the pattern, each character in the member name    
  must be the same as the character in the corresponding position in the       
  pattern.  However, the % character in the pattern is considered "the same"   
  as any character.  For example, the pattern AB%D matches names ABCD,         
  ABFD and ABZD.                                                               

  The * character matches more than the % character.  The % matches exactly    
  one character, no matter what it is.  The * , on the other hand, matches     
  any number of characters, no matter what they are.  For example, the         
  pattern A*B matches the names AB, ACB and AZZZZZZB.                          
zFernand0 commented 1 year ago

This enhancement has had no activity for 12 months. The issue also has less than 5 up-votes by the community. No action on this enhancement is targeted for the next 2 calendar quarters. Therefore, this enhancement is being closed. If you feel that this enhancement should continue to be available for community up-votes, you may reopen this issue.