mirror of
https://github.com/yorukot/superfile.git
synced 2025-02-06 10:02:21 +00:00
Create cd_on_quit.ps1
This commit is contained in:
parent
3d6dd23511
commit
f82d93b77f
15
cd_on_quit/cd_on_quit.ps1
Normal file
15
cd_on_quit/cd_on_quit.ps1
Normal file
@ -0,0 +1,15 @@
|
||||
function spf() {
|
||||
param (
|
||||
[string[]]$Params
|
||||
)
|
||||
$spf_location = [Environment]::GetFolderPath("LocalApplicationData") + "\Programs\superfile\spf.exe"
|
||||
$SPF_LAST_DIR_PATH = [Environment]::GetFolderPath("LocalApplicationData") + "\superfile\lastdir"
|
||||
|
||||
& $spf_location @Params
|
||||
|
||||
if (Test-Path $SPF_LAST_DIR_PATH) {
|
||||
$SPF_LAST_DIR = Get-Content -Path $SPF_LAST_DIR_PATH
|
||||
Invoke-Expression $SPF_LAST_DIR
|
||||
Remove-Item -Force $SPF_LAST_DIR_PATH
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user