badlib.blogg.se

File renamer
File renamer











"Sometimes you have to go back to where you started, to get to where you want to go."

file renamer file renamer

Expand collapse popup drag and drop pic renamer #include #include #include Global $aListFiles, $sListFiles Global $sPreFixName = '', $sFileType = '' Global $sNewFolderName = 'FILE_RENAMER' $sPreFixName = InputBox ( 'Create Prefix', 'What is the prefix that you want for each file' ) $gui = GUICreate ( 'File_Renamer', 200, 200, - 1, - 1, - 1, $WS_EX_ACCEPTFILES ) $ed = GUICtrlCreateEdit ( '', 5, 5, 190, 190 ) GUICtrlSetState ( - 1, $GUI_DROPACCEPTED ) GUISetState ( ) While 1 $gm = GUIGetMsg ( ) Switch $gm Case $GUI_EVENT_DROPPED $sListFiles &= StringRight (, stringlen ( ) - StringInStr (, '\', 0, - 1 ) ) For $x = 0 To UBound ( $aListFiles ) - 1 Local $sTempPath = $sTempPath = StringReplace ( $sTempPath, , '' ) MsgBox('','',$sTempPath & '***') If $aListFiles = '' Then _ArrayAdd ( $aListFiles, $sTempPath ) EndIf Next ConsoleWrite ( & ' ' & StringInStr (, '\', 0, - 1 ) & ) GUICtrlSetData ( $ed, $sListFiles ) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd _ArrayDelete ( $aListFiles, 0 ) _ArrayDisplay($aListFiles) & "\PIC_RENAMER") For $x = 0 To UBound ( $aListFiles ) - 1 $sFileType = StringRight ( $aListFiles, 3 ) MsgBox('','extension',$sFileType) ConsoleWrite ( '>! WRITING.' & $aListFiles & ' -> ' & & "\" & $sNewFolderName & "\" & $sPreFixName & $x + 1 & '.' & $sFileType & ) FileCopy ( $aListFiles, & "\" & $sNewFolderName & "\" & $sPreFixName & $x + 1 & '.' & $sFileType, 9 ) If Then MsgBox ( '', 'ERROR', 'Could not copy file to directory.' ) Next













File renamer