help please

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
stondesign
Posts: 22
Joined: 23 Oct 2018 17:28

help please

#1 Post by stondesign » 25 Sep 2019 07:52

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
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 }

Post Reply