Hi All,
I am using directory resource with recursive option in windows.
I want to create below folders.
“Program files”
“SFTP Users"
Directories but its creating below structure
"Programe”
“files”
"SFTP "
“Users”
can you please help here with creation of directories with space.
Recipe code:-
%w[ Program Files
SFTP users\Alloc_SFTP ].each do |path|
directory path do
recursive true
action :create
end
end
U can use arrays to define folders which needed to be create.
Double slash in path for windows platform
folders = ['C:\\Program files\\', 'C:\\Program files\\MyAwesomeDir', 'C:\\Program files\\MyAwesomeDir2']
folders.each do |folder|
directory folder do
recursive true
action :create
end
end