-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_placeholders.m
More file actions
31 lines (26 loc) · 847 Bytes
/
Copy pathcreate_placeholders.m
File metadata and controls
31 lines (26 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% create_placeholders.m
% This script creates the required folders and puts a .placeholder file in each.
% Define output directories
output_dirs = {
'09YCEW180-cmp-gather', ...
'09YCEW180-offset-gather', ...
'09YCEW180-shot-gather'
};
% Loop over each directory
for i = 1:length(output_dirs)
dir_name = output_dirs{i};
% Create directory if it does not exist
if ~exist(dir_name, 'dir')
mkdir(dir_name);
end
% Create a .placeholder file
placeholder_path = fullfile(dir_name, '.placeholder');
fid = fopen(placeholder_path, 'w');
if fid ~= -1
fprintf(fid, 'This file is a placeholder to preserve this directory.\n');
fclose(fid);
else
warning('Failed to create placeholder in %s', dir_name);
end
end
disp('✅ Placeholder files created successfully.');