Page 1 of 1

help please

Posted: 25 Sep 2019 07:52
by stondesign
Hello with this code I open a selection window! At the end of the procedure how can I get out a window to save the file with another name

Code: Select all

<# : chooser.bat

@echo off

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\"


    start veicoli\system\editing.hta
    start /min /wait script.bat %%~I
    ren %%~I "File_Edited"

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
if ($f.Multiselect) { $f.FileNames } else { $f.FileName }