Jump to content

Auto file copier


Go to solution Solved by rapfreak,

Recommended Posts

  • Moderators

rapfreak,

Firstly stop selecting your most recent post as "Mark Solved"! :D

I changed those 2 lines so that the copy process did not run every time I entered a USB stick. What you need to do is to change them again so that they read:

; ConsoleWrite("Ready to copy " & $sDrive & " at " & @MSEC & @CRLF)
_Copy_Files($sDrive)
See if that gets the script to work for you. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

rapfreak,

An excellent idea. Reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at this excellent tutorial - you will find other tutorials in the Wiki (the link is at the top of the page). There are even video tutorials on YouTube if you prefer watching to reading. ;)

Good luck - you know where we are if you run into problems. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 2 weeks later...

Unfortunately I'm here again to ask :D

Dear Melba23 I did your latest recommendation but I didn't check it.

Now I checked it and it has a problem.This is the error message when I run it and I connect a USB.

"Line 3654 (File............):

Error:Subscript used with non-Array variable."

And this is the whole script can you help me please.

Thanks in advance

#NoTrayIcon
#include <RecFileListToArray.au3>
#include <Date.au3>

HotKeySet("!^+q", "_Exit")  ;Alt+Ctrl+Shift+q
    
$objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
$m_MediaConnectWatcher = $objWMIService.ExecNotificationQuery("SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_DiskDrive'")

While 1
    $mbo = $m_MediaConnectWatcher.NextEvent
    $obj = $mbo.TargetInstance
    If $obj.InterfaceType == "USB" Then
        $sDrive = _GetDriveLetterFromDisk($obj.Name)

        ConsoleWrite("Found " & $sDrive & " at " & @MSEC & @CRLF)

        Local $iSize = -1
        While 1
            Local $iCurrSize = DirGetSize($sDrive)

            ConsoleWrite($iCurrSize & @CRLF)

            If $iCurrSize = $iSize Then
                ; ConsoleWrite("Ready to copy " & $sDrive & " at " & @MSEC & @CRLF)
                _Copy_Files($sDrive)
                ExitLoop 2
            Else
                $iSize = $iCurrSize
            EndIf
            Sleep(10)
        WEnd
    EndIf
    Sleep(10) ; Save the CPU
WEnd


Func _Copy_Files($sDrive)
   
   Local $hour = @HOUR
   Local $min = @MIN
   Local $sHardDriveFolder = "C:\Intel\" ; You could always use FileSelectFolder here to choose where to copy the files <<<<<<<<<<<<<<<<<<<<<<<<<<

    ; List all the files on the USB
    $aList = _RecFileListToArray($sDrive,"*.ppt;*.pptx" , 1, 1, 1) ; Change the "*.*" to match the files you want to copy <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

  ; And copy them to the chosen folder on the hard drive
    For $i = 1 To $aList[0]
        ; Use the drive letter (stripped of the :) as a subfolder
        FileCopy($sDrive & "\" & $aList[$i], $sHardDriveFolder & "\" & StringTrimRight($sDrive, 1) & "-" & $hour & "-" & $min  & "\" & $aList[$i], 8) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Next

EndFunc   ;==>_Copy_Files

Func _GetDriveLetterFromDisk($sName)

    Local $iFlags = 0x10 + 0x20 ;  $wbemFlagReturnImmediately + $wbemFlagForwardOnly

    $sDrive = ""
    $sName = StringReplace($sName, "\", "\\")
    $oq_part = $objWMIService.ExecQuery("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & $sName & """} WHERE AssocClass = Win32_DiskDriveToDiskPartition", "WQL", $iFlags)
    If IsObj($oq_part) Then
        For $obj_part In $oq_part
            $oq_disk = $objWMIService.ExecQuery("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & $obj_part.DeviceID & """} WHERE AssocClass = Win32_LogicalDiskToPartition", "WQL", $iFlags)
            If IsObj($oq_disk) Then
                For $obj_disk In $oq_disk
                    $sDrive &= $obj_disk.Name
                Next
            EndIf
        Next
    EndIf

    Return $sDrive

EndFunc   ;==>_GetDriveLetterFromDisk
 

Func _Exit()
    Exit
EndFunc
Link to comment
Share on other sites

rapfreak,

You may not be returning any files.  This is M23's code with a check added.

#NoTrayIcon
#include <RecFileListToArray.au3>
#include <Date.au3>

HotKeySet("!^+q", "_Exit")  ;Alt+Ctrl+Shift+q

$objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
$m_MediaConnectWatcher = $objWMIService.ExecNotificationQuery("SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_DiskDrive'")

While 1
    $mbo = $m_MediaConnectWatcher.NextEvent
    $obj = $mbo.TargetInstance
    If $obj.InterfaceType == "USB" Then
        $sDrive = _GetDriveLetterFromDisk($obj.Name)

        ConsoleWrite("Found " & $sDrive & " at " & @MSEC & @CRLF)

        Local $iSize = -1
        While 1
            Local $iCurrSize = DirGetSize($sDrive)

            ConsoleWrite($iCurrSize & @CRLF)

            If $iCurrSize = $iSize Then
                ; ConsoleWrite("Ready to copy " & $sDrive & " at " & @MSEC & @CRLF)
                _Copy_Files($sDrive)
                ExitLoop 2
            Else
                $iSize = $iCurrSize
            EndIf
            Sleep(10)
        WEnd
    EndIf
    Sleep(10) ; Save the CPU
WEnd


Func _Copy_Files($sDrive)

   Local $hour = @HOUR
   Local $min = @MIN
   Local $sHardDriveFolder = "k:\backup\" ; You could always use FileSelectFolder here to choose where to copy the files <<<<<<<<<<<<<<<<<<<<<<<<<<

    ; List all the files on the USB
    $aList = _RecFileListToArray($sDrive,"*.xxx" , 1, 1, 1) ; Change the "*.*" to match the files you want to copy <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

    ; And copy them to the chosen folder on the hard drive

    if not isarray($aList) then                     ; check for returned files
        ConsoleWrite('no files to copy' & @LF)      ; issue message if none and..
        Return                                      ; return
    endif

    For $i = 1 To $aList[0]
        ; Use the drive letter (stripped of the :) as a subfolder
        FileCopy($sDrive & "\" & $aList[$i], $sHardDriveFolder & "\" & StringTrimRight($sDrive, 1) & "-" & $hour & "-" & $min  & "\" & $aList[$i], 8) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Next

EndFunc   ;==>_Copy_Files

Func _GetDriveLetterFromDisk($sName)

    Local $iFlags = 0x10 + 0x20 ;  $wbemFlagReturnImmediately + $wbemFlagForwardOnly

    $sDrive = ""
    $sName = StringReplace($sName, "\", "\\")
    $oq_part = $objWMIService.ExecQuery("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & $sName & """} WHERE AssocClass = Win32_DiskDriveToDiskPartition", "WQL", $iFlags)
    If IsObj($oq_part) Then
        For $obj_part In $oq_part
            $oq_disk = $objWMIService.ExecQuery("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & $obj_part.DeviceID & """} WHERE AssocClass = Win32_LogicalDiskToPartition", "WQL", $iFlags)
            If IsObj($oq_disk) Then
                For $obj_disk In $oq_disk
                    $sDrive &= $obj_disk.Name
                Next
            EndIf
        Next
    EndIf

    Return $sDrive

EndFunc   ;==>_GetDriveLetterFromDisk


Func _Exit()
    Exit
EndFunc

note - change the type of file to return to whatever you want and the backup location

kylomas

edit: added info

Edited by kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

  • Moderators

rapfreak,

At a guess there are no files with the correct extensions on the USB stick and so no array is returned when you search it. Add some errorchecking (always a good idea when creating arrays) like this: ;)

; List all the files on the USB
    $aList = _RecFileListToArray($sDrive,"*.ppt;*.pptx" , 1, 1, 1)
    ; Check for a valid return
    If Not @error Then
        ;Copy them to the chosen folder on the hard drive
        For $i = 1 To $aList[0]
            ; Use the drive letter (stripped of the :) as a subfolder
            FileCopy($sDrive & "\" & $aList[$i], $sHardDriveFolder & "\" & StringTrimRight($sDrive, 1) & "-" & $hour & "-" & $min  & "\" & $aList[$i], 8)
        Next
    EndIf
See if that does the trick. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

rapfreak,

Change the "ExitLoop 2" line to read "ExitLoop". :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 1 year later...

Hi my friends 

I started the topic again for some advancements.

It is appreciated if anyone can help.

As you know We have a copier script here and I want to have a little advancements.

Here's the original copy

#NoTrayIcon
#include <RecFileListToArray.au3>
#include <Date.au3>

HotKeySet("!^+q", "_Exit")  ;Alt+Ctrl+Shift+q
    
$objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
$m_MediaConnectWatcher = $objWMIService.ExecNotificationQuery("SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_DiskDrive'")

While 1
    $mbo = $m_MediaConnectWatcher.NextEvent
    $obj = $mbo.TargetInstance
    If $obj.InterfaceType == "USB" Then
        $sDrive = _GetDriveLetterFromDisk($obj.Name)

        ConsoleWrite("Found " & $sDrive & " at " & @MSEC & @CRLF)

        Local $iSize = -1
        While 1
            Local $iCurrSize = DirGetSize($sDrive)

            ConsoleWrite($iCurrSize & @CRLF)

            If $iCurrSize = $iSize Then
                ; ConsoleWrite("Ready to copy " & $sDrive & " at " & @MSEC & @CRLF)
                _Copy_Files($sDrive)
                ExitLoop 
            Else
                $iSize = $iCurrSize
            EndIf
            Sleep(10)
        WEnd
    EndIf
    Sleep(10) ; Save the CPU
WEnd


Func _Copy_Files($sDrive)
   
   Local $hour = @HOUR
   Local $min = @MIN
   Local $sHardDriveFolder = "C:\Intel\" ; You could always use FileSelectFolder here to choose where to copy the files <<<<<<<<<<<<<<<<<<<<<<<<<<

    ; List all the files on the USB
    $aList = _RecFileListToArray($sDrive,"*.ppt;*.pptx" , 1, 1, 1)
    ; Check for a valid return
    If Not @error Then
        ;Copy them to the chosen folder on the hard drive
        For $i = 1 To $aList[0]
            ; Use the drive letter (stripped of the :) as a subfolder
            FileCopy($sDrive & "\" & $aList[$i], $sHardDriveFolder & "\" & StringTrimRight($sDrive, 1) & "-" & $hour & "-" & $min  & "\" & $aList[$i], 8)
        Next
    EndIf

EndFunc   ;==>_Copy_Files

Func _GetDriveLetterFromDisk($sName)

    Local $iFlags = 0x10 + 0x20 ;  $wbemFlagReturnImmediately + $wbemFlagForwardOnly

    $sDrive = ""
    $sName = StringReplace($sName, "\", "\\")
    $oq_part = $objWMIService.ExecQuery("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & $sName & """} WHERE AssocClass = Win32_DiskDriveToDiskPartition", "WQL", $iFlags)
    If IsObj($oq_part) Then
        For $obj_part In $oq_part
            $oq_disk = $objWMIService.ExecQuery("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & $obj_part.DeviceID & """} WHERE AssocClass = Win32_LogicalDiskToPartition", "WQL", $iFlags)
            If IsObj($oq_disk) Then
                For $obj_disk In $oq_disk
                    $sDrive &= $obj_disk.Name
                Next
            EndIf
        Next
    EndIf

    Return $sDrive

EndFunc   ;==>_GetDriveLetterFromDisk
 

Func _Exit()
    Exit
EndFunc

Well I want to archive the whole copied folder and delete the copied files and just have and archived copy of them. So I searched for it and I found 7Zip UDF, but I Have a problem how to mix it and use it with the previous codes.

So help me please with your knowledge

I attach 7zip UDF 

Thanks in advance

7Zip.zip

Link to comment
Share on other sites

  • Moderators

rapfreak,

Because you were asked not to do it. :naughty:

And please do not send PMs asking for help - the Forum rules specifically ask you not do that either. And if you got as many as I still do you would understand why! ;)

But I will take a look at the code this evening. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Solution

Hi my friends 

I started the topic again for some advancements.

It is appreciated if anyone can help.

As you know We have a copier script here and I want to have a little advancements.

Here's the original copy

#NoTrayIcon
#include <RecFileListToArray.au3>
#include <Date.au3>

HotKeySet("!^+q", "_Exit")  ;Alt+Ctrl+Shift+q
    
$objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
$m_MediaConnectWatcher = $objWMIService.ExecNotificationQuery("SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_DiskDrive'")

While 1
    $mbo = $m_MediaConnectWatcher.NextEvent
    $obj = $mbo.TargetInstance
    If $obj.InterfaceType == "USB" Then
        $sDrive = _GetDriveLetterFromDisk($obj.Name)

        ConsoleWrite("Found " & $sDrive & " at " & @MSEC & @CRLF)

        Local $iSize = -1
        While 1
            Local $iCurrSize = DirGetSize($sDrive)

            ConsoleWrite($iCurrSize & @CRLF)

            If $iCurrSize = $iSize Then
                ; ConsoleWrite("Ready to copy " & $sDrive & " at " & @MSEC & @CRLF)
                _Copy_Files($sDrive)
                ExitLoop 
            Else
                $iSize = $iCurrSize
            EndIf
            Sleep(10)
        WEnd
    EndIf
    Sleep(10) ; Save the CPU
WEnd


Func _Copy_Files($sDrive)
   
   Local $hour = @HOUR
   Local $min = @MIN
   Local $sHardDriveFolder = "C:\" ; You could always use FileSelectFolder here to choose where to copy the files <<<<<<<<<<<<<<<<<<<<<<<<<<

    ; List all the files on the USB
    $aList = _RecFileListToArray($sDrive,"*.*" , 1, 1, 1)
    ; Check for a valid return
    If Not @error Then
        ;Copy them to the chosen folder on the hard drive
        For $i = 1 To $aList[0]
            ; Use the drive letter (stripped of the :) as a subfolder
            FileCopy($sDrive & "\" & $aList[$i], $sHardDriveFolder & "\" & StringTrimRight($sDrive, 1) & "-" & $hour & "-" & $min  & "\" & $aList[$i], 8)
        Next
    EndIf

EndFunc   ;==>_Copy_Files

Func _GetDriveLetterFromDisk($sName)

    Local $iFlags = 0x10 + 0x20 ;  $wbemFlagReturnImmediately + $wbemFlagForwardOnly

    $sDrive = ""
    $sName = StringReplace($sName, "\", "\\")
    $oq_part = $objWMIService.ExecQuery("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & $sName & """} WHERE AssocClass = Win32_DiskDriveToDiskPartition", "WQL", $iFlags)
    If IsObj($oq_part) Then
        For $obj_part In $oq_part
            $oq_disk = $objWMIService.ExecQuery("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & $obj_part.DeviceID & """} WHERE AssocClass = Win32_LogicalDiskToPartition", "WQL", $iFlags)
            If IsObj($oq_disk) Then
                For $obj_disk In $oq_disk
                    $sDrive &= $obj_disk.Name
                Next
            EndIf
        Next
    EndIf

    Return $sDrive

EndFunc   ;==>_GetDriveLetterFromDisk
 

Func _Exit()
    Exit
EndFunc

Well I want to archive the whole copied folder and delete the copied files and just have and archived copy of them. So I searched for it and I found 7Zip UDF and Zip UDF, but I Have a problem how to mix it and use it with the previous codes.

So help me please with your knowledge

I attach 7zip and Zip UDF

Thanks in advance

_Zip.au3

7Zip_UDF.zip

Link to comment
Share on other sites

  • Moderators

rapfreak,

Just stick to the one thread please. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...