Combine destinationFolder, fileName ; File. Copy source, destination ;. Austin Salonen Austin Salonen 47k 15 15 gold badges silver badges bronze badges. Maybe File. That doesn't copy a file from one directory to another , which is what's in the question. It isn't now, but it was before you made your edit look at the history of your answer.
Copy sourceFile, destFile, true ;. Exists targetDirectoryInfo. Copy sourceFilePath, Path. NET Core 2. Ali Zahid Ali Zahid 1, 1 1 gold badge 18 18 silver badges 18 18 bronze badges. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked 0. Related Download Microsoft Edge More info. Contents Exit focus mode.
Is this page helpful? Please rate your experience Yes No. Any additional feedback? Submit and view feedback for This product This page. View all page feedback. In this article. Asked yesterday. Active yesterday. Viewed 41 times. GetFileName x. Show ex. Hours, ts. Minutes, ts. Seconds, ts. Mong Zhu Sebastian Sebastian New contributor. Your code will be executed sequentially, not concurrently.
Besides that, you're also including the execution time of Directory. If your really want the time it took to copy the files, you might want to start your timer right before the loop and end it right after the loop. Oh, and the code will stop executing if an error occurs - until you've closed the message box which may falsify your time while it's open.
Thank you for your help! Add a comment.
0コメント