Skip to content

Instantly share code, notes, and snippets.

@potchy
potchy / Flatten folder.ps1
Created March 21, 2025 01:37
Flatten folder
# Define input and output directories
$input = "C:\Users\John\input"
$output = "C:\Users\John\output"
# Ensure the output directory exists
if (-not (Test-Path -Path $output)) {
New-Item -ItemType Directory -Path $output
}
# Get full paths (to avoid relative path confusion)
@potchy
potchy / CascadeDeleteAttribute.cs
Created July 22, 2020 16:00 — forked from tystol/CascadeDeleteAttribute.cs
Entity Framework CascadeDelete using Data Annotations
using System;
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class CascadeDeleteAttribute : Attribute { }