Trying to copy files with a number sequence In cmd prompt - windows

hard drive is dying, trying to save all my pictures and having to manually copy one by one in dos. The names are just numbered jpgs. Ie: 001 010 305 ect. Is there a way to make it copy them in order? I would just copy the whole folder but when it hits a corrupted file the drive dies and I have to re plug in. So if I could choose the starting point and increment up that would be perfect. Thanks!

Related

Rclone - Find destination folder automatically at upload to ftp

I have to upload around 40-50 piece of files (same extensions) to ftp, every day, to separated folders, where those file belongs.
Im, complete newbie in scripting, I just got to know rclone and it's amazing what it can do.
So I'm wondering is there any script to reclone to find out destination folder automatically for files to be uploaded, based on their names? More precisely based on the numbers in the file name:
Filenames 2nd and 3rd number are the same as destination folders last two digits,
Destination folders are in different places, but under the same root folder.
Is there any way to ask rclone to check the 2nd and 3rd character of each files waiting to be uploaded, and based on that two numbers, upload it to the a directory where these two numbers are listed.
For example:
50321_XXXXX.txt -----goes_to-----ftp:/xxxx/yyyy/zzzz/nn03/
51124_XXXXX.txt -----goes_to-----ftp:/xxxx/wwww/kkkk/nn11/
53413_XXXXX.txt -----goes_to-----ftp:/xxxx/dddd/aaaa/nn34/
Could you help me with where to go?
Thank you for your answers.
Nothing. I don't know where to start.

Applescript - Concurrently Rename and Copy multiple SD cards

I've got a working Automator workflow which takes any single (one at a time) inserted LUMIX labelled SD card, reads a value from a text file on it and then renames the files on the card
file= dayofmonth_variablefromtext_originalfilename.mp4
find /Volumes/LUMIX/DCIM/*/P*.MP4
then apply filename process to them
and copies them to an SSD.
It watches the /Volumes/ folder for a mount (LUMIX) then does its thing.
The advantage is that then we know which files are copied as they have been renamed.
However I now need this to work concurrently across multiple SD cards on the same machine - we are looking at a four card reader.
So while SD card 1 is copying, someone may insert another or more and we need them all to be processed in the same fashion with their unique identifier from the txt file on the card - or I guess the name of the SD card. We could rename the SD cards to have unique names, but in tests this did not seem to work and we need 8 or more SD cards for our team.
I cannot figure out how to achieve this in automator/applescript as the source folder /Volumes is a single watch point.
Essentially we are trying to avoid people waiting around till a slot is free for them to put the SD card into, with four, it can be slotted in and they can go (that is the idea)
Any ideas?

How to represent bunch of files as one file on Windows for direct reading

I'd like to make one file representing (linking) bunch of files - something as on Linux named pipe do. The motivation is not to concatenate files (not to create the new one when I have originals and I want to keep them) so do not duplicate data. For example I want to use this to load videos from camera which are divided by approx. 2 GB.

Undo a botched command prompt copy which concatenated all of my files

In a Windows 8 Command Prompt, I had a backup drive plugged in and I navigated to my User directory. I executed the command:
copy Documents G:/Seagate_backup/Documents
What I assumed was that copy would create the Documents directory on my backup drive and then copy the contents of the C: Documents directory into it. That is not what happened!
I proceeded to wipe my hard-drive and re-install the operating system, thinking I had backed up the important files, only to find out that copy seemingly concatenated all the C: Documents files of different types (.doc, .pdf, .txt, etc) into one file called "Documents." This file is of course unreadable but opening it in Notepad reveals what happened. I can see some of my documents which were plain text throughout the massively long file.
How do I undo this!!? It's terrible because I was actually helping a friend and was so sure of myself but now this has happened. The only thing I can think of doing is searching for some common separator amongst the concatenated files and write some sort of script to split the file back apart. But then I would have to guess the extensions of each of the pieces...
Merging files together in the fashion that copy uses, discards important file system information such as file size and file name. While the file name may not be as important the size is. Both parameters are used by the OS to discriminate files.
This problem might sound familiar if you have damaged your file allocation table before and all files disappeared. In both cases, you will end up with a binary blob (be it an actual disk or something like your file which might resemble a disk image) that lacks any size and filename information.
Fortunately, this is where a lot of file system recovery tools can help. They are specialized in matching patterns. Specifically they are looking for giveaway clues to what type a file is of, where it starts and what it's size is.
This is for instance enabled by many file types having a set of magic numbers that are used to allow a program to check if a file really is of the type that the extension claims to be.
In principle it is possible to undo this process more or less well.
You will need to use data recovery tools or other analysis tools like binwalk to extract the concatenated binary blob. Essentially the same tools that are used to recover deleted files should be able to extract your documents again. Without any filename of course. I recommend renaming the file to a disk image (.img) and either mounting it from within the operating system as a virtual harddisk (don't worry that it has no file system - it should show up as an unformatted drive) or directly using a data recovery tool or analysis tool which can read binary files (binwalk, for instance, can do that directly, but may not find all types of files as it's mainly for unpacking firmware images that may be assembled in the same or a similar way to how your files ended up).

How do I automate renaming & moving these files in OSX, as they're created?

I'm using game capture software that creates a new folder every time a clip is started. The folder format is:
Game_Name
Segment_001.mp4
Segment.info
Game_Name.json
So if I take ten clips, I end up with 10 folders, and I can pull the videos out, but then I have ten clips all called Segment_001.mp4. When a second clip is created, the folder gets created as "Game_Name 2", but the clip inside is still Segment_001.mp4.
What I would like to do is have a script that I can run on a group of files (or a folder that I can drop multiple folders into) that will pull out and rename all the video clips based on the parent folder name. Generally these are being copied to an external hard drive, so if it could be done at the same time as it's being copied, that would be ideal.
As an example, given
Game_Name
Segment_001.mp4
Segment.info
Game_Name.json
Game_Name 2
Segment_001.mp4
Segment.info
Game_Name.json
The ideal result would be that this script runs, and I end up with:
Game_Name
Game_Name.mp4
Game_Name 2.mp4
Or even better, Game_Name_01, 02, etc.

Resources