
If you want to set file names with the same structure in File Explorer, there are much easier way. 2 Rename Multiple Files with the Same Name Structure.

You don’t have to spend time on selecting files every time.
#For in do batch get just filenames how to
i already know how to get it on his computer and to run in stealth. In this way, you just need to input new names for these files after pressing Tab each time. they will be hidden from the search is he renames them, but he copied my entire flash drive so he would be renaming for a long time and i know he won't rename them all because some of them are dependent upon other files. If youre running a batch of tests you probably want to append to a log file, but if you reuse the same script remember to change the filename. and if he has renamed any of my files i want to know where the rest of them are.
#For in do batch get just filenames code
Copy the code into Notepad or other text editor and save it as getfiles.bat: echo off for /r a in () do echo a > getfiles.txt The for command here is used to run a further command for each file or folder in the set. i could have the program auto delete but if another file on the system is named the same as one of my files then it would also be deleted. Simple and straightforward this one, a script to list all files in a directory and all corresponding subdirectories. he made copies to multiple computers and removable memory so im looking for a way to run an automated search that can find the location of the files and put them in a log (like #2 that you suggested) so i can delete them manually. #s 3 and 4, well i would do that but, to elaborate on the purpose of the program i wish to write, this will be stealth-run on a friend's computer who copied the (dangerous) contents of my flash drive. Batch Script: to find files - posted in Programming: Hi, I have zero experience in batch scripting but I want to write a code that can accept a list of user input, that have partial filename, and. # 2 seems like it will work, i will create this and try it on my computer and see how it works Otherwise, the quotation marks are interpreted. To use quotation marks, you must use usebackq. If the file names that you supply contain spaces, use quotation marks around the text (for example, File Name).

#1 it can be in a given list, but it can also be in the program itself, i was trying to do an 'if exist' but the options of where it searches are limited The body of the for statement references i to get the second token, j to get the third token, and k to get all of the remaining tokens.
