Copy specific files from one folder to another - explorer

I hope you might be able to help me. Essentially I have about 300,000 excel files in an external hard drive which is the output from 50,000 simulations. There are various files in the external hard drive folder but the specific file(s) which I wish to copy and paste in my matlab directory are:
result_simulation_xI_byCal_totale %where x is an integer from 1..50000
The rest of the files are extraneous and will not be used for plotting (at least at the moment). I need to copy all 50000 files of the above name to my destination folder.
The source folder is F:\
The destination folder is: C:Documents\MATLAB
I have read around but am struggling and hope that someone may be able to help me.
Thanks in advance.
mp

On windows you can do it 2 ways, one is to use the command prompt or black screen mode of the computer if there is one and use the copy command with parameter values and something like a * wildcard character. The second is to use windows explorer and do it all manually in blocks like this - click on the drive letter in the left column showing the devices and some folders, then click on the destination folder you want to copy the files into, next click on the drive letter then folder from where you want to copy the files from. Click on the first filename in the List (best display format for this task), then press and hold down the shift key and then press the cursor down key one at a time or continuously until a reasonable number of files are highlighted, say no more than 50 files at a time, and release the shift key. Now move the mouse cursor into the highlighted part of the list, press and keep pressed the left mouse button and drag the block over to and on top of the destination folder name and you should see a + symbol, keep the mouse steady, then release your finger from the mouse button and the files should then be copied over as shown in a progress panel, then move the mouse away to the right while copying is done. Repeat as many times as necessary this effective but labour intensive method.

Not sure this question belongs on stackoverflow, but anyway:
Open the command prompt (cmd.exe) and use the following command to copy 50,000 times in a loop:
for /l %i in (1,1,50000) do #copy f:\result_simulation_%iI_byCal_totale C:\Documents\MATLAB

Related

PhpED How to jump in an instance to Favourite File

I have a file in my project I frequently need to open, and I am forever looking for it. OK, I can usually find it via Ctrl + Tab (as it was recently accessed) or via the drop-down menu right of the file tabs, or via Ctrl + Shift + N to search for the file by name, but all of these take too long.
A Global bookmark would be awesome or a 'favourite files' tab I could float... does anything like that exist? I tried floating the file itself as well as adding it to a 'New Tab Group' (both can be done by right-clicking the file tab), but both of these options take up valuable space - you cannot have the file auto-hide in the way unpinned tabs do.
Does anyone have a trick up their sleeve?
It's a little on the nose and not the perfect "global bookmark" solution sought, but renaming the file so that it appears at the top of the drop-down tab list is half a solution. The file is still two clicks away - one would be better.

IntelliJ IDEA: how to search for a folder / directory / package name?

I wish to search just directory (folder) names and packages within the modules of my current project.
How can I do this?
CTRL+Shift+N allows me to find a
class
CTRL+Shift+Alt+N allows
me to find a symbol
Is there a function for that allows me to search just directories, folders and package names?
I'd like the result of this search to be that the directory / package sought is highlighted in the "Project" box.
For example, if I type in "model.feed" then then I get this:
and preferably while I'm typing that a list of any directories matching would be shown in real time (in the same way as classes are when you do CTRL+Shift+N).
I'm using IntelliJ IDEA 12.0.4 (Ultimate).
In IntelliJ IDEA 13, you can use Goto File (Ctrl+Shift+N) and enter the directory/package name with a slash afterwards. Then you'll see all the matching directories in your project.
I propose this as a partial solution to your query.
The following steps will allow you to find a file or directory or package name or jar name that is visible in the project view.
Caveats stated explicitly below, but give this a go.
Click on the root folder in the Project View.
Start typing words that you want to search on to find packages/files/folders/jars in the project view
A tool tip will appear that contains the text Search For: along with the text that you have
entered.
The Project View will then highlight the first folder or file that matches the text that you have entered.
This may be close to what you are looking for.
The only caveat is that this search is constrained to those entities currently visible in the Project View so if you want to search a particular part of the project it appears that you have to expand those folder within the Project View. (From my testing of this in IntelliJ Ultimate Version 11.)
One way to work around this is to go to the root element in your project. Perform a partial traversal of where you want to go then by pressing enter you open the folder that you have landed on and then that search is completed.
Starting typing text again after pressing Enter will recommence the search from the current item in the Project View.
So by experimenting with this feature you can interactively walk around your project in the Project View in a dialog-box-free manner.
As a side note you can use the letters Camel Case style to traverse and find classes in the ProjectView
WINDOWS:
CTRL + SHIFT + N
MACOS:
⌘ command + ⇧ shift + O
If you try
CTRL + SHIFT + F
You can do a global file search (like eclipse CTRL + H).
In the file search, you can select which folder to search for, what file type to search for, case sensitive etc, all the normal stuff.
Global Replace is
CTRL + SHIFT + R
(Mac replace CTRL for CMD)
On mac it is
CMD + Shift + O
at least for intellij 14.1
If you have the file open in the editor and can't figure out the location in the project view
WINDOWS:
ALT + F1
From Select In... pick the first item, Project View
It seems IntelliJ doesn't directly support this. Here are the best alternatives I've thought of so far:
I suggest these steps if there is nothing in the folder yet (Windows):
Windows:
Right click on the project root, and choose "show in explorer"
In the search box on the top right, search for the folder you want (e.g. META-INF)
Right click, "open folder location"
Linux/Unix/Cygwin:
Copy the path instead, (in the right-click menu),
cd to the directory using a console or cygwin,
use the 'find' utility. E.g. type find . -iname 'SomeFolderName*'
If there is already something in the folder, I suggest you do this:
Ctrl-Shift-F to search for files
Enter the directory name inside a wildcard pattern (eg. */META-INF/*)
open the first file that occurs in that folder
Click on the circular target icon to "scroll from source" (at the top of the project panel).
If you find yourself wanting to search for folders/packages often, you can use the Go to File command (Ctrl + Shift + N) and set a filter on Directories so that you can quickly search for directories and packages. The filter will be saved for the next time you use Go to File. As a demonstration:
Use Go to File (Ctrl + Shift + N) and click on the filter icon (funnel-shaped) on the top right of the search box. Disable/unselect all other selections and only keep Directories selected.
Try searching -- you should only see directories and packages in the result.
Try using Go to File again -- you should find that the filter still exists

Updating distributed Word VBA macros - is it possible, how would you do it?

I have a VBA macro which runs in Word 2003. It is one module and the code attached to a userform, and it goes to about 30 client sites. When I first rolled this out I sent someone round to each site to place a .dot template in the Word Startup folder of each of 30 boxes, which then makes the macro appear as a button on the toolbar for each user.
All the users are internet connected.
The location of the .dot template varies from machine to machine, so "installers" would be out of play I presume?
I am anticipating that the macro made need to change from time to time. Is there any way I could get the user to press a button to get the macro to update itself?
Whether its push button or auto run checking for update, I would presumably need to know how to determine where the macro is running from (path) without a document necessarily having been saved, and how to find path to the Startup folder tools>options>file locations but programatically .
This can be done.
create 2 .dot files, loader.dot (checks for updates) and worker.dot (the main macro you are using and want to be able to update automatically).
the first loader.dot should go into C:\Program Files\Microsoft Office\OFFICE11\STARTUP
This is a trusted location and the macro will be loaded into any Word document. Use an AutoExec() subroutine to ensure it runs whenever a word doc is loaded.
worker.dot can go in any fixed installation location e.g. C:\yourapp\worker.dot
The logic in loader.dot is remove any reference to worker.dot (I had to enable trust of VBA model in macro security settings) check for an update using an http call, if new version available download it overwriting worker.dot, then add reference from file specifying worker.dot
I'm not sure that the user-presses-a-button model is ideal.
I'd look into building a "loader" template. Its job would be to run at startup and look for updates to the template/macro you already have and download/install/whatever such files when they change. Then load whatever's installed locally for use.
You should also think about whether it's a problem if an update is available but someone doesn't use it (perhaps they started Word before the change was uploaded, or they're offline). Also, do you need to know what version people are using? Have your loader report back, via HTTP, email or some other method (Twitter?)
Any such loader needs to either very stable (otherwise you just replace chasing around replacing the target template with chasing around replacing the loader) or able to update itself when necessary.

jedit navigating file system with keys when opening a file

How to make jedit navigating file system with left, down keys. So when in the ctrl-o form, if I press left key after the cursor is at the first character of file name, it should jump up the file browser tree and every left key press would move up higher in directory. It used to work out of the box with 5-6 old jedit, but these newer versions, I can't get it to work.
This alone made me love jedit for so many years.
An alternative usage is to type .. into the filename label then enter ( or ../.. to go up two levels ). To go down into a directory or open a file name, type the few characters of the file or directory then hit tab to autocomplete the name of the node then enter. Once you autocomplete the name you can use the up and down arrows to select in the current directory hierarchy.
Not a direct answer, but I find this to be a rather quick mode.
Alternatively, you can switch focus to the file hierarchy pane with shift+tab , shift+tab and then use the arrow keys. Not sure if this is exactly what you're looking for, because I don't use this navigation mode.
I prefer my previous answer.

Why does a deleted file reappear in Vista?

I have an automated test running on my program that generates some large MPG files along with other files. After running the test, I have the script clean up after itself. The other files (a mix of binary and text files) are removed with no problems. The MPG files, however, don't get deleted. If I try and manually delete the MPG files from explorer after the test has run, they are removed from the explorer window only to reappear a few seconds later. Process explorer shows that they are being used by explorer.exe. Eventually, I am able to remove these files. Any idea why this is happening?
Is it possible that Explorer is holding onto the files to generate thumbs.db and perform its other work? I ask that because I've noticed considerable lag as Explorer evaluates every movie file in my media directories, even when in Details view. (You can tell, because the address bar of that Explorer window will become a progress bar, slowly -- ever so slowly on my box at home -- turning green.)
Is this behavior still exhibited if no Explorer windows are open to the appropriate directory?
It sounds like something is still hanging on to a reference to the file. Is it possilbe that you have shadow copy set up and it is trying to archive the file?