Open and move files follow by date

How do I open files follow by date for button 1 and move the files follow by date for button 2?
Thanks

Try something like this
Imports System.IO
Public Class Form1
Const oldFolder As String = "c:\temp"
Const newFolder As String = "c:\temp1"
Dim count As Integer = 0
Dim oldFiles As String()
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'open follow by the file names
If count < oldFolder.Count Then
Dim ps2 As Process = Process.Start(oldFiles(count))
count += 1
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
'get files
Dim info As New DirectoryInfo(oldFolder)
oldFiles = info.GetFiles("*.jpg").AsEnumerable() _
.OrderBy(Function(x) x.LastWriteTime) _
.Where(Function(x) x.LastWriteTime.Date = Now.Date) _
.Select(Function(x) x.FullName).ToArray()
count = 0
End Sub
End Class
jdweng
Joel, there are nothing happen after run your codes
Imports System.IO
Public Class Form1
Const oldFolder As String = "C:\Users\hwai\Desktop\Capture"
Const newFolder As String = "C:\Users\hwai\Desktop\ New folder(3)"
Dim count As Integer = 0
Dim oldFiles As String()
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'get files
Dim info As New DirectoryInfo(oldFolder)
oldFiles = info.GetFiles("*.jpg").AsEnumerable() _
.OrderBy(Function(x) x.LastWriteTime) _
.Where(Function(x) x.LastWriteTime.Date = Now.Date) _
.Select(Function(x) x.FullName).ToArray()
count = 0
End Sub
End Class
Thanks

Similar Messages

  • I'm running snow leopard. The try to open any .mov file in Quicktime, and I get an error message that says, "The document xyz.mov could not be opened. The movie is not in a format that Quicktime player understands. I'm a recent upgrade to Snow Leopard.

    I'm running snow leopard. The try to open any .mov file in Quicktime, and I get an error message that says, "The document xyz.mov could not be opened. The movie is not in a format that Quicktime player understands. I'm a recent upgrade to Snow Leopard.
    Help!
    Thanks, Mark

    Unfortunately, the error message gives no details about what codec might be missing or what it needs.
    If the file can't be opened in QT, it only means you cannot use the QT "Inspector" window to check what compression formats were used to create the file. It does not mean you can't use the Finder "Information" window to check on the compression formats or use a third party media information window (e.g., like VLC which will open many compression formats not supported natively by QT) to determine what kind of data is included in the MOV wrapper. If the file cannot be opened in any app, it is usually a good sign that the file itself is corrupted.
    It's a stupid error message. Apple should do better than that.
    Error trapping is quite extensive but there are still many areas which require human oversight. The message is telling you that either the container has a problem (e.g., not properly terminated, non-standard, or corrupted) or that one or more of the compression formats used is not supported by your current codec component configuration or that the data was encoded using non-standard settings or preferences not supported by QT or that the fourCC code does not match the data contained in the file or that there are timecode inconsistencies, etc., etc., etc. In short there are a near infinite number of possible problems for which it would be very difficult/nearly impossible to program error trapping depending on your sourcing of content and how you process it before it reaches the player app. Think of it like trying to play a BD disc in an DVD player.
    I'll call Apple support when I get a chance.
    Chances are good that they will end up sending you back here. In any case, it is often a good idea to post a sample file for examination by other QT users. At the very least, they should be able to tell you if the sample file will play on other systems which would indicate whether or not the file itself is bad and under the best of circumstances whould allow them to examing the file in detail for various common problems.

  • Functional Specification For Opening And closing stock On Particular Date

    Dear Gurus,
    I am creating report for opening and closing stock on particular date in which batch and storage location should also be included. I want to know the tables and fields for the same.I have searched the forum and got report on month basis but I want this report on posting day basis.kindly suggest tables and fields. Thanks in Advance

    Dear sir,
    There are many other colums that client wants to add which are not present in MB5B transaction.columns which client wants to add are as follows...
    Material Number                                                   
    Material Description                                       
    Material Type                                                                        
    Material Group                                                                     
    External material Group                                                            
    Movement Type     
    Plant     
    Storage Location     
    Customer Number     
    Customer Name     
    Vendor Number     
    Vendor Name     
    Posting Date     Receipt Doc. Number
    Issue Doc. Number     
    Reference Issue Document Number     
    Opening Stock Quanity     
    Material Receipt Quantity     
    Material Issue Quantity     
    Material Closing Stock Quantity      
    Value Of Closing Stock
    And for this I want  tables and logic for the same. kindly provide the solution for the same.

  • Code Execution in Cover Flow View and .mov Files

    There is a code inside QuickTime movies that gets executed in Cover Flow view in Leopard!!!!!!!!.
    I was helping a friend installing Leopard on his machine, and after restarting, I was showing him the new options in the Finder, when a found a bunch of videos (searched on his computer with Spotlight) and switched to 'Cover Flow View', and then Safari started opening web pages from the internet (Mostly adult sites).
    After doing some tests I've noticed that the pages load the moment the Finder 'refines' the view of the videos. You know when the Finder first generates a blocky image of the video (some times called proxy image) and then generates a higher or cleaner resolution of that same video.
    Not only that, if I resize the window or the preview pane, the code executed again and Safari opened the pages again!!!!
    The Finder also executed the code in icon view with the 'Show Icon Preview' option selected in 'View Options' (Command-J).
    Opening the videos in QuickTime Player did not trigger the code. But I've noticed that the videos start playing the moment they open. The Inspector (Command-I) didn't show anything unusual. But the Properties window (Command-J in QuickTime Pro) show a "Sprite Track" of Format 'Sprite' but again the different tabs (Annotations, Resources, Visual Settings or Other Settings) didn't show anything unusual.
    *CORRECTION: The code also gets executed at the middle of the video when played in QuickTime. So this problem is related to QuickTime.!!!!!!*
    The only solution to stop the code execution is to delete the 'Sprite Track'!!!!.
    I also opened the movies in TextEdit and found the following text almost at the end of all the weird symbols:
    (I'm sorry but the code disappears when I publish this post).
    That's one of the pages that Safari was opening.
    I don't know where my friend downloaded those videos, but the potential security risk is imminent.
    I had the same results even after updating to QuickTime 7.3
    I can upload the videos somewhere (at least the 'clean' ones) so you can make you own tests.
    Any thoughts or comments?????
    Is this a known issue in QuickTime?????
    P.S. Once again please excuse my English (my main language is Spanish).

    If I'm understanding correctly the "Sprite" is a part of how QuickTime works. In older versions you USED to be able to attach JavaScript to a sprite and do all kinds of useful and fun things. However, some websites used JavaScript to alter themselves, so a well crafted QuickTime movie could be used to deploy code that would alter websites. As a result, a LOT of this functionality was curtailed in later versions and many cool QuickTime functions no longer work.
    The few that DO still work are when they are basic hyperlinks that take you to another web page, (Like at the end of this movie, BUT you have to click the link to go
    http://www.makentosh.com/tipsfromtheiceberg/Blog/Entries/2006/3/7Somebody_ToldMe....html
    ) and others no longer work within the browser (they only work when using the QuickTime player). Give this a try. Use Safari to "Open File..." and open the .mov file. After it's open, see if it generates any other windows from there. If it doesn't, then I'd THINK it's operating as intended BUT it wouldn't hurt to send your feedback here for Apple to look into and/or fix it if necessary.
    http://www.apple.com/quicktime/feedback/
    Message was edited by: Kyn Drake

  • How can I open a .mov file with iMovie?

    Hi,
    I keep trying to open a .mov file in iMovie and it isn't doing it. Is that not a recognized file extension? Should I convert the video file somehow?
    Thanks!

    .mov is just a container for a variety of video codecs, some of which are not recognized by iMovie.  You will need to convert it first with a third party app such as Media Converter (which is free, see:   http://media-converter.sourceforge.net). 
    Another free app  VideoSpec (see:  http://videospec.free.fr) is useful for identifying all the details of a video clip
    Geoff.

  • Opening a .mov file on a Mac across a Windows network causes hang

    QuickTime player hangs when I try to open a .mov file on a networked Mac OSX machine from my Windows XP machine. This happens 80-90% of the time; that is, not every time, but most of the time.
    I've tried this from 2-3 different machines, and get the same result.
    Interesting thing is that, if I'm viewing the directory that the .mov file comes from in Windows Explorer, Windows Explorer also hangs - so it looks like something bad in going on in the Windows networking layer.
    File opens fine when I open it locally or on another Windows machine on the network.
    We're actually accessing the QT SDK from an app we're developing. We first noticed this behavior in our app, and decided to see if we could repro the problem in QT player. Sure enough, we could.
    Is there somewhere else I can log this message so that it will come to the attention of the SDK group? This a major problem for our app that I need to resolve one way or another.

    A MOV. file can be anything.
    I would suggest you download and install Perian from http://perian.org/
    You should read this support page http://perian.org/#support in case you need to delete older codecs.

  • Opening multiple movie files to play sequentially.

    Currently, if I highlight several movie (e.g. .avi) files in a Finder window and then double-click on one of them, each of the files is opened in a separate QuickTime window and if I have "automatically play movies when opened" QuickTime preference set, then they all start playing simultaneously!
    How do I change it so that opening multiple movie files results in them being played sequentially in a single window?
    P.S. I have "Open movies in new players" preference is disabled.
    P.P.S. For image files it all works correctly - they are opened in Preview and I get an option of starting a slideshow...

    Hi,
    I'm not on a Mac at the moment to test, but I could have sworn you used to be able to open one movie, pause it and then drag and drop subsequent movies onto that window to append them to the end.
    Give it a try. Sorry if I've been imagining things though

  • Problems opening a mov file on quicktime

    Hey guys, i just purchased a mac and im having some problems opening a MOV. file on quicktime. FOr some reason im just getting sound and no video. Can anyone please help me out? Is there some extensions i have to download? Please let me know thanks.

    A MOV. file can be anything.
    I would suggest you download and install Perian from http://perian.org/
    You should read this support page http://perian.org/#support in case you need to delete older codecs.

  • I want to transfer my photo and movie files from my iPhone 4S to my mac.

    I have posted this question before without any success and was hoping by reposting it may promt a solution to my problem.
    I want to transfer my photo and movie files from my iPhone to my Mac OS X (10.5.8).
    But I don't want to use Cloud or iTunes.
    Is there a way to connect my iPhone 4S to my Mac directly,
    say ... via a program or such on my MAC, to drag and drop the photos and Movie files,
    directly into a folder. ??????????
    Reason want to connect iPone to MAC or MAC to iPhone is ....
    I have no DATA on my iPhone Mobile plan at moment.
    So Photosync app is no good, as I can't download the app to my iPhone.
    I can download a Photosync to my MAC ...
    but with the Photosync app you can only send data.
    Thanks in advance for any help.

    Sorry I should of mentioned ....
    Reason want to connect iPone to MAC or MAC to iPhone is ....
    I have no DATA on my iPhone plan at moment.
    So Photosync app is no good, as I can't download the app to my iPhone.
    I can download a Photosync to my MAC ...
    but with the Photosync app you can only send data  (so needs to be on the  iPhone).

  • Hi, I have downloaded some avi files and mov files. i am not getting audio while playing the movie. i tried to play with iTunes, QT, DivX player. but I am getting audio in mp4 files. can u help me to fix this

    Hi, I have downloaded some avi files and mov files. i am not getting audio while playing the movie. i tried to play with iTunes, QT, DivX player. but I am getting audio in mp4 files. can u help me to fix this

    First, back up all data and then uninstall "DivX" according to the developer's instructions.
    Then try this:
    VideoLAN - Download official VLC media player for Mac OS X

  • Good evening .. I'm with my problem no9 lightroom. I was open and gave the following message: The module was desabilitado.Renove reveal your subscription to reactivate module reveal. But it's all right with my signature.

    Good evening .. I'm with my problem no9 lightroom. I was open and gave the following message: The module was desabilitado.Renove reveal your subscription to reactivate module reveal. But it's all right with my signature.

    Heya, Jonathan. Welcome to Apple Discussions!
    Congratulations, and welcome to the fun-filled world of kernel panics. Yup, that's the text in the gray box you're getting.
    The good news is you don't necessarily have to reinstall Mac OS X. If you have access to another computer and a FireWire cable, you can reinstall the 10.4.3 update, and everything should be groovy.
    * Connect the two computers via FireWire cable. Your iBook should not be on yet.
    * Boot up your iBook and hold down the 'T' key as it starts up. The iBook will enter Target mode.
    * Download the Mac OS 10.4.3 update on the other computer.
    * Run the 10.4.3 updater as normal, but select the hard drive of your iBook when you get to the list of available volumes.
    Failing that, you can reinstall Mac OS X on your iBook from your install DVD. When you select your volume, make sure you click on the 'Options' button and select 'Archive and Install'. You'll retain all your personal files and network settings, but you might have to reinstall applications, haxies, etc.

  • How to open and save file like the Notepad Demo do?

    I am a newer to Java Web Start. I found that in the Notepad Demo, when user try to open or save file, a message box appear and give the user some security suggestions.
    In my application, I used a JFileChooser and set the <security> element to <j2ee-application-client-permissions/> in the jnlp file. But the application will thow an exception:
    access denied (java.io.FilePermission C:\Documents and Settings\Administrator\desktop\Java Web Start.lnk read)
    Can someone tell me how to solve this problem. By the way, where can I find the source of the Notepad Demo. I want my application to open and save file just like the Notepad Demo do.

    The Notpad demo uses the JNLP api to read and write files. The api doc can be found at:
    http://java.sun.com/products/javawebstart/docs/javadoc/index.html
    Although the Notpad demo source is not available, there is other sample code available at:
    http://developer.java.sun.com/developer/releases/javawebstart/
    Included here is the webpad demo, which uses the FileOpenService and
    FileSaveService API's.

  • Opening and closing balance between 2 dates

    hi.
    i am facing a problem while fetching the opening and closing balance for a particular G/L account.
    In my  program  i am entering G/L account for a date range i.e, between two dates and i want opening and closing balance for these 2 date ranges.
    So, please tell me is there any function module to fetch opening and closing balance between two dates.
    Regards,
    ROHINI.K.

    Hi Rohini,
                 Check this FM :   BAPI_GL_GETGLACCPERIODBALANCES.
    If we use this functional module, we will get opening and closing balance of corresponding G/L Acc.
    (e.g)
    CALL FUNCTION 'BAPI_GL_GETGLACCPERIODBALANCES'
        EXPORTING
          companycode                   =  '1000'
          glacct                              = '0000548101'
          fiscalyear                         = '2007'    
         currencytype                      = '10'
       IMPORTING
    BALANCE_CARRIED_FORWARD       =  gs_bal-balance
         RETURN                                        =  v_return
        TABLES
          account_balances                            = gt_bal.

  • How to Open and Save files

    I have a problem to open and save the files.here is my code. can anyone help me to open the files.
    public void actionPerformed(ActionEvent e) {
    if ("open".equals(e.getActionCommand())) {
    FileDialog fdopen=new FileDialog(this, "Load File", FileDialog.LOAD);
    fdopen.show();
    Thanks for ur time

    Hi fbnmir or who ever can answer my question,
    My problem is similar to the code you wrote. I'm trying to make (or rather complete a half done) editor for text files. For opening and saving files I have so far:
    public void actionPerformed(ActionEvent ae){
    FileDialog filedialog;
    final SearchDialog searchDialog;
    String arg = (String)ae.getActionCommand();
    // the Open ... case
    if(arg.equals(Editor.fileLabels[0])){ 
    if(Editor.VERBOSE)
    System.err.println(Editor.fileLabels[0] +
                        " has been selected");
    filedialog = new FileDialog(editor, "Open File Dialog", FileDialog.LOAD);
    filedialog.show();
    if(Editor.VERBOSE){  
    System.err.println("Exited filedialog.setVisible(true);");
    System.err.println("Open file = " + filedialog.getFile());
    System.err.println("Open directory = " + filedialog.getDirectory());
    //the Save ... case
    if(arg.equals(Editor.fileLabels[1])){ 
    if(Editor.VERBOSE)
    System.err.println(Editor.fileLabels[1] + " has been selected");
    filedialog = new FileDialog(editor, "Save File Dialog", FileDialog.SAVE);
    filedialog.show();
    if(Editor.VERBOSE){ 
    System.err.println("Exited filedialog.setVisible(true);");
    System.err.println("Save file = " + filedialog.getFile());
    System.err.println("Save directory = " + filedialog.getDirectory());
    These are two components of a MenuHandler class. The problem with this code is that in the text editor window, even if the Open button is pressed the file I want to open isn't displayed. Although the System.err (I think that's what it is called) says:
    Open ... has been selected
    Exited filedialog.setVisible(true);
    Open file = tutorial_01.rtf
    Open directory = C:\dhruba\epgy_2006\tutorial\
    Save ... has been selected
    Exited filedialog.setVisible(true);
    Save file = test.txt
    Save directory = C:\dhruba\epgy_2006\tutorial\
    How can I actually display the file I want to open, or save some text I've written?
    I would appreciate any help, thanks.

  • Popup with open and save file option

    Hi,
    I have created a button on my page name as "Export File" and created a process and called on "EXPORT FILE" button. I am using utl file in this procedure and i want to download this file and file will be .ics file using for calendar.
    My page process code is
    begin
    pro_create_ical(:P6_START_DATE,:P6_END_DATE);
    end;when i click on export file button it should raise a popup with open and save file option.
    How i can do this?
    Thanks & Regards
    Vedant
    Edited by: Vedant on Jan 25, 2013 1:59 AM
    Edited by: Vedant on Jan 25, 2013 2:00 AM
    Edited by: Vedant on Jan 25, 2013 3:49 AM

    Shiv,
    Have you installed any new Software/Spyware/Virus Scanner etc.Check it out.It might have caused the issue for last 5 days.
    This issue is fixed in Latest Support Package Versions.
    Which Version of Support Package you are using?
    If EP6 <SP19 you will face this issue.
    Just upgrade it to EP6, Support Pack-19,this will be resolved.
    Upgrade of Support Pack wont take much time.you can get the document under http://service.sap.com/instguides
    Hope it helps
    Regards,
    Karthick Eswaran
    *Reward Points for helpful answers.

Maybe you are looking for

  • Flash9 player HELL

    Hi all, I installed flash player 9 and ofcourse it didnt work. the plugin works fine but the activx control refuses. When i rightclick on a movie the context menu says (greyed out) 'movie not loaded'... enough allready this takes up too much of my ti

  • Transfer value from global automatic activity in Aqualogic BPM Suite

    Hi, I am new to Aqualogic BMP suite and stuck with the following problem : In aqualogic bpm suite, if we are setting some values to some variables in a global automatic activity in a process how to get those values back in some other activities (say

  • Rebuild Table

    Table where lots of deletion or insertion takes place , probably has High HWM. If the HWM is high , it is better to rebuild table segment for performance sake. my question is when to rebuild a table/index and how to find that a table has High water m

  • Decimals management through TCURX

    Hi Experts, I do have the usual issue with ITL currency in BEx (SAP BI 7.0 / BEx 3.5). As you probably know, Italian Lire is a no-decimal currency, stored that way in TCURX table. I do load my amounts from an Oracle database, through DBConnect. There

  • Exceptions on non-Key Figures

    Hi, I'm creating a new query in 'query designer' and I'd like to apply an exception. Is it possible to apply exceptions on non-key figures? I would like to apply an exception on a characteristic (ie if project status = active, highlight it green)? Ch