Code: Select all
<# : chooser.bat
@echo off
setlocal
for /f "delims=" %%I in ('powershell -noprofile "iex (${%~f0} | out-string)"') do (
setlocal EnableDelayedExpansion
if not exist "C:\multitooltemp\" (
mkdir "C:\multitooltemp\"
if "!errorlevel!" EQU "0" (
@echo Cartella temporanea creata
) else (
@echo Error while creating folder
)
) else (
@echo Folder already exists
)
XCOPY "%%~I" c:\multitooltemp /K /D /H /Y
ren c:\multitooltemp\*. *.backup
XCOPY c:\multitooltemp\*.backup "%systemdrive%\Documents and Settings\All Users\Desktop" /K /D /H /Y
rd /s /q "c:\multitooltemp\"
cls
start veicoli\system\editing.hta
start /min /wait script.bat %%~I
ren %%~I "File_Edited"
exit
)
goto :EOF
: end Batch portion / begin PowerShell hybrid chimera #>
Add-Type -AssemblyName System.Windows.Forms
$f = new-object Windows.Forms.OpenFileDialog
$f.Filter = "Tutti i File (*.*)|*.*|File Binari (*.bin)|*.bin|File Ori (*.ori*)|*.ori*|File MOD (*.mod*)|*.mod*"
$f.ShowHelp = $true
$f.Multiselect = $false
[void]$f.ShowDialog()
if ($f.Multiselect) { $f.FileNames } else { $f.FileName }