|
-
Jan 10th, 2013, 11:19 AM
#1
Thread Starter
Fanatic Member
copy with no Delete---
Where could one find a Copy with a NoDelete option ?
Thanks
Alpha Micro: Alpha Basic, AS400 V5r2, EDI (Trusted Link/ Inovis.com),Access AS/400 via VB6, Qbasic for data conversions. A mix of Hardware too. ASCII Table , New Number to Words/66 digits , AS/400(v5r2) VB6 Viewer/Ask for code(ODBC) ^ What Is Transferring? , Check your Ports #Perfect Passwords , *Slide Bar Example , Logoff, Restart, Shut-Down PC *Keep Form On Top , Opaque Form ^ Create Objects at Run Time @ Check Key Caps Locks # GetTickCount(System Up Time) * Convert text to Excel & Collected Icons + Resize: Form/Text box ^ PC GateWay via Shell $ Drag & Drop Game ! PopUpMenu *Print File/no Open# Timer on Mult Forms ~ Splash & Mult Forms & Lots of Comments + Random/Timer/Guess * Dec >Hex >Oct >Bin % Get MAC (NIC) < saving to Registry > Wookiee Cookies \ BackUpDisk / World Conection SpeedTest $ Glossary Commonly Used Terms # phonetic list @ Detailed Computer Scan
When posting Code, Use tags.. [CODE] *Your Code* [/CODE]
-
Jan 10th, 2013, 12:14 PM
#2
Hyperactive Member
Re: copy with no Delete---
I would say that any intrinsic Windows Copy command would do the trick as opposed to a command like Move, which would delete the old after it copied.
-
Jan 10th, 2013, 06:09 PM
#3
Thread Starter
Fanatic Member
Re: copy with no Delete---
-
Jan 10th, 2013, 08:47 PM
#4
Re: copy with no Delete---
What are you referring to?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jan 10th, 2013, 08:56 PM
#5
Thread Starter
Fanatic Member
Re: copy with no Delete---
I would like to copy/NoDelete to another folder. For example, Copy/NoDelete cell phone photos to folder on XP-disk drive...only files (photos) that no not exsist.
Is there a copy program that will do this?
-
Jan 10th, 2013, 09:11 PM
#6
Re: copy with no Delete---
Ah ok! Although, I am still confusing about what you mean by "NoDelete", it sound like after you copy the data from the phone it deletes it doing a cut rather than a copy is that correct?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jan 10th, 2013, 09:36 PM
#7
Thread Starter
Fanatic Member
Re: copy with no Delete---
Copy the files, but if the file already exsist, do not copy it
Currently, I have to click on No 100 times...do not copy file.
-
Jan 10th, 2013, 11:18 PM
#8
Re: copy with no Delete---
I have made a program that might help! Do you have VB6 to compile the code or do you want me to upload the exe and send you the link?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jan 11th, 2013, 03:03 AM
#9
Thread Starter
Fanatic Member
Re: copy with no Delete---
-
Jan 11th, 2013, 03:46 AM
#10
Re: copy with no Delete---
This might work for you.
vb Code:
Option Explicit Private Declare Function OpenFile Lib "kernel32" (ByVal lpFileName As String, _ lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As Long Private Type SHFILEOPSTRUCT hwnd As Long wFunc As Long pFrom As String pTo As String fFlags As Integer fAnyOperationsAborted As Long hNameMappings As Long lpszProgressTitle As Long ' only used if FOF_SIMPLEPROGRESS, sets dialog title End Type Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long ' Available Operations Private Const FO_COPY = &H2 ' Copy File/Folder Private Const FO_DELETE = &H3 ' Delete File/Folder Private Const FO_MOVE = &H1 ' Move File/Folder Private Const FO_RENAME = &H4 ' Rename File/Folder ' Flags Private Const FOF_ALLOWUNDO = &H40 ' Allow to undo rename, delete ie sends to recycle bin Private Const FOF_FILESONLY = &H80 ' Only allow files Private Const FOF_NOCONFIRMATION = &H10 ' No File Delete or Overwrite Confirmation Dialog Private Const FOF_SILENT = &H4 ' No copy/move dialog Private Const FOF_SIMPLEPROGRESS = &H100 ' Does not display file names Private Const FOF_RENAMEONCOLLISION As Long = &H8 'Rename if there is a file of that name Private Const OF_EXIST As Long = &H4000 Private Const OFS_MAXPATHNAME As Long = 128 Private Const HFILE_ERROR As Long = -1 Private Type OFSTRUCT cBytes As Byte fFixedDisk As Byte nErrCode As Integer Reserved1 As Integer Reserved2 As Integer szPathName(OFS_MAXPATHNAME) As Byte End Type Dim fullpath As String, lngReturn As Long, strReturn As Long, strSource As String, strTarget As String Private Sub VBCopyFiles(ByRef strSource As String, ByRef strTarget As String) Dim op As SHFILEOPSTRUCT, sFilename As String sFilename = Dir(strTarget & "\") Do While sFilename > "" sFilename = Dir() Loop If FileExists(strTarget) = False Then With op .wFunc = FO_COPY ' Set function .pFrom = strSource ' Set current path .pTo = strTarget ' Set new path .fFlags = FOF_SILENT Or FOF_NOCONFIRMATION End With 'Perform operation SHFileOperation op If strSource <> "" Then MsgBox ("Finished copying! Quitting.") Unload Me End If End If End Sub Private Function FileExists(ByVal FName As String) As Boolean 'http://www.vbforums.com/showthread.php?t=349990 Dim lRetVal As Long Dim OfSt As OFSTRUCT lRetVal = OpenFile(FName, OfSt, OF_EXIST) If lRetVal <> HFILE_ERROR Then FileExists = True Else FileExists = False End If End Function Private Sub Command1_Click() VBCopyFiles source, destination End Sub
I was using a form to test the code but it could probably work in a module using sub Main.
For the SubMain just put:
vb Code:
VBCopyFiles source, destination
Instead of using the CommandButton
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|