Using Packages , File Operations how to delete subdirectories

More
2 years 3 months ago #23542 by prashant
Hello
Using packages -> File Operations , I can delete all files with in a folder including subdirectories , how do I delete all the subdirectories also? 

I can delete 'a' folder using delete folder method but not subdirectory (unless I am missing option for wildcard)

Cheers,
PM

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #23545 by admin
1. You can delete entire folder and all sub directories using delete directory option
2. You can recreate it later if necessary.
3. Delete directory option does not work with mask.
    EG it is not possible to delete some sub-folders using mask and keep others  

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #23546 by prashant
I didn't understand

How do I delete all subfolders inside
C:\Users\Superadmin\Documents\KBIAutomation\eomaterial\output\

as 
1 .C:\Users\Superadmin\Documents\KBIAutomation\eomaterial\output\*.*   -> didn't work as you mentioned no wildcards

or
1.I delete C:\Users\Superadmin\Documents\KBIAutomation\eomaterial\output\
2. then create another file operation to create a folder to rec-create a folder ? 

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #23547 by Peter.Jonson
I delete C:\Users\Superadmin\Documents\KBIAutomation\eomaterial\output\
2. then create another file operation to create a folder to rec-create a folder ? 

Peter Jonson
ETL Developer

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #23548 by prashant
Got it. Current work done 

I feel it’s an additional step and can be optimised with a flag 

cheers 
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #23911 by admin
You may find this change in the latest release useful

07/06/2024 6.4.3.1

+ Added: "Added clear directory" option to File operation package action


Mike
ETL Architect

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save