filerename(strPack,​varargin)

This function renames the files with extensions .xxx in folder 'strPack' as 1.xxx, 2.xxx, 3.xxx,...

Al momento, stai seguendo questo contributo

% =========================================================================
% function filerename(strPack,varargin)
%
% This function renames the files with extensions .xxx in folder 'strPack' as 1.xxx, 2.xxx, 3.xxx,...
%
% Input
% (1). -strPack: string, path of the folder, can be absolute or
% relative; eg: 'D:\work\test\' or 'test\'
% (2). -varargin: file extensions, can be '*.txt', '*.dat','*.bmp', '*.jpg';
% if an invalid file extension is given, an error occurs; you can
% add valid file extensions in this function at 'TODO:...'
% default value: '*.txt'
%
% Note
% <1>. files in the strPack should not have names the same as output; in
% other words, the files in the strPack should not named by 1.xxx,
% 2.xxx,...; otherwise the new file overrides the old one; in this case, this function will throw an error
%
% Example
% filepath = 'test\';
% filerename(filepath,'*.dat');
%
% Author: x z
% Institution: ...
% Year: 2016
% Version: 1.0
% =========================================================================

Cita come

x z (2026). filerename(strPack,varargin) (https://it.mathworks.com/matlabcentral/fileexchange/59539-filerename-strpack-varargin), MATLAB Central File Exchange. Recuperato .

Categorie

Scopri di più su Startup and Shutdown in Help Center e MATLAB Answers

Informazioni generali

Compatibilità della release di MATLAB

  • Compatibile con qualsiasi release

Compatibilità della piattaforma

  • Windows
  • macOS
  • Linux
Versione Pubblicato Note della release Action
1.0.0.0