Delete, move and move and delete from one folder to a new one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI!
I found some peaces of code, and i believe is possible to do what i need.
I need something like that:
I have already folders, where I save files converted from Inventor dwg to pdf and dwg acad and dxf
workspace &”\dxf”
workspace &”\dwg”
This work fine.
What I need is.
When I create a new parametrization, to have the possibility to fire a rule (clicking in a button in a form for ex.), to ask the user what to do with previous files in that folders (if they exist)… delete, move to a new folder, or move and delete.
In case "move (like copy/paste) or move and delete (like cut/paste)" asking for destination folder and create that folder is a good feature...
For now, after any new parametrization, the user must remember that have to clean the folders after create new pdf or dwg.
Something like this_________check if exist files in folder and what tro do with them
Try If System.IO.File.Exists(aExist) = True Then Select Case UCase(Action) Case "D" System.IO.File.Delete(oLocation) Case "M" System.IO.File.Move(aExist, oLocation) Case "DM" System.IO.File.Delete(oLocation) System.IO.File.Move(aExist, oLocation) End Select End If
More this__________Ask for a folder and save it in the new folder.
Imports System
Imports System.Diagnostics
Imports System.Threading
Imports System.Windows.Forms
Sub Main()
oFolder = oFolderDlg
r= MsgBox(oFolder & " was selected" &vbLf & vbLf & "Proceed?", MsgBoxStyle.YesNo,"iLogic")
If r = MsgBoxResult.No
Exit Sub
End If
Thank you.