MATLAB: How do I copy files with a specific extension to a folder one directory above it? -


i trying copy specific files 1 folder folder 1 directory above it. want of folders have @ once. here's file structure:

201415continuousfordropteqc/stationa/201411/ path has 25 folders labeled 5 through 30 (representing days). in each of these 25 folders there 3 folders named 'dat', 'raw', 'rinex'. want files ending in .14o raw folder (there many other file types in folder well) copied rinex folder.

i'm hoping can find way repeat every day in 201411 folder. last part isn't critical since think can type path manually , run script copy , pastes files want.

i hope clear. i'm new-ish matlab.

thank in advance help! tiffany

you can using dir command. check link.
can use twice. first 25 folders , files within folder.

days = dir('201415continuousfordropteqc/stationa/201411/'); k=3:numel(days) %notice 3   files = dir([days(k).name '/raw/*.14o']);   n=1:numel(files)     copyfile([days(k).name '/raw/' files(n).name],[days(k).name '/rinex/' files(n).name]);   end end 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -