- T-SQL functions to convert Strings to Tables
- Batch Process to rename multiple files using Windows DOS
- SSIS Multiple Lookups in one
- mysqldump: Got error: 2049: Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled) when trying to connect
- AHK Countdown Tooltip
- Microsoft Windows 7 Professional
- Ms-DOS Command Prompt (6.1.7601)
A quick article on how to rename multiple files using the command prompt and a bit of string manipulation. This example will rename files which contain the string " (Copy)" and replace it with nothing (so removes it). The challenge here is the space character and delimiting by a string.
- -- What I have
- Image00001 (Copy).jpg
- Image00002 (Copy).jpg
- -- What I want
Before I continue, the undo may work in MS Windows (Control key + Z) but don't count on it. I'm going to use a short batch process but to save time on the different ways of doing this, the example below uses a command prompt to a) create a batch file b) use it to rename the files c) delete the batch file.
- Microsoft Windows 7 Enterprise
- AutoHotkey (see code for AHK version)
Someone suggested an app that counts the days I have left serving my notice. I thought I'd go one better and have it calculate to the nearest second. I call this latest app "byeBU" and this is version 0.4 Beta (unofficial app).
Something to do...
A quick note on how to copy files and folders over without overwriting existing files. It's easy to say "Yes" and replace all files. What I need is something that synchronizes files on an internal hard drive to an external one. I wanted it to copy only the files that were new in the original folder and only copy those over (reason being, the archive is 4 terabytes and backing up only the changed files would speed things up).
- Microsoft Windows XP
- Microsoft Windows 7
- Microsoft Windows 8
- for Vista and Windows 2008 without XCOPY, try ROBOCOPY.
We're going to use MS-DOS because I'm that old.
A quick note for myself as I'd forgotten how to do this (we're talking technology belonging to the 90s - MS-DOS v6.22). The example wants to loop through a directory and then loop through the line it finds.
I use another technology for automation but sometimes the simpler solution is the one I make for other people to use. Explaining MS-DOS batch programs is a lot easier and colleagues trust these more than my all-in-one GUI applications.
Note: we're using the code in a DOS Batch program so our variables have to be prefixed with a double-percent rather than just the one:
So this is an article to list methods of retrieving the number of files in a folder/directory.
Why can't we just use a loop and file pattern native to the Autohotkey programming language:
- -- UserFolder := RegExReplace( MyInputField, "\\$") ; gets rid of trailing slash if required
- -- Method #1
- count := 0
- Loop, %UserFolder%\*.*, 0, 1
- -- note for future use:
- ; if A_LoopFileAttrib contains H,R,S
- ; continue