Batch File Or Exe To Copy & Rename Directory And Update Files
Apr 28, 2012
I require a batch file or free utility that i can redistribute from my web site to other users, (gamers) that will copy the contents of a directory inside their game to a new location and re-name the directory at the same time. Something like this; Copy "GenesisVehicleruck diesel4tonbaker"to "GenesisVehicleruckdiesel4tonbutcher".The batch file needs to be run without the need for a command line box being opened, that is, if the user can double click on it or run it with a 'right click' that would be great. Problem there is, I maybe need an exe file not a batch file. The other part of the problem is that the folder to be copied may or may not be in the same location on every PC that runs the file. It may be the case that the 4tonbaker folder is on; [code] and I require the end user to have no need to know, just for the directory to be copied and renamed when and where it is found.If possible I then want the batch file to perform a second task. I want to distribute a folder, lets say it is 4tonbutcher and in that folder there are files lets say doc1.txt, doc2.txt and doc3.txt.On any given users PC 4tonbaker has these same named files but the content is different to the ones in my folder 4tonbutcher, I want to update the newly created folder, 4tonbutcher with the new txt files I distribute.
So, User downloads a folder called 4tonbutcher from my site.Batch file copies and renames a folder from a location on the users PC, "Genesis Vehiclesruckdiesel4tonbaker" to "Genesis Vehiclesruckdiesel4tonbutcher".Batch file copies doc1.txt, doc2.txt and doc3.txt from the downloaded folder to the newly created folder 4tonbutcher.
I have a folder with around 2000 files in it. I want to be able to copy certain files from this folder (normally around 40) and place them in a brand new folder, I want to be able to do this with nothing more than a txt file that has all the file names I need copying in it with every file name on a separate line.I receive around 10 new txt files each day so you can imagine how tedious it is searching through 2000 files, picking out the 40 I need, times a day everyday.To make things even more complicated, the txt files I receive don't always have the correct file names in them, maybe there's a misspelling or a word or two missing for some of the names. That's ok when I'm going through picking out the files I need to copy myself because I can normally tell which file is being requested, but I can't see it being so easy for a program or whatever to do, I'm guessing it'll need to have a search feature where it picks out the most likely file.I'd like it to be as automated as possible. I receive the txt file, make sure each file name is on a separate line then a program or script or whatever goes out and picks out the files (or most likely files for the name's that aren't exact matches) and copies them into a brand new folder (which I'd like to be the same name as the text file it's using to choose the files).
So I'm trying to make a personal shortcut on my computer to change a password using the shiftkeys .exe (C:WindowsSystem32sethc.exe) which can be done from setup.I'm looking to design this because I frequently deal with friends and family who have forgotten passwords, as well as my purchasing used computers.I want to automate the process, but I've hit a problem, which is making the batch file remove itself.I have a .exe file replace sethc.exe, with sethc.exe renamed to sethc.exe.I'm using the following lines Code: del sethc.exeren sethc2.exe sethc.exedel %0 The batch file deletes itself successfully (del %0), but it's completely failing at the removal of the .exe and the renaming. I've tried changing the targeting, checking the syntax, but as far as I can tell, everything checks out, yet it still fails.
My assignment is to develop a batch file that our logon script can call on to satisfy the following condition:
If the User Information for Office 2010(HKCUSoftwareMicrosoftOfficeCommonUserInfo) equals the local admin default "UserInfo" then
go to ldap/active directory and, using the client's "logon name", find the client in ldap and use their "Display Name" as the value for the String "UserName" in HKCUSoftwareMicrosoftOfficeCommonUserInfo I found this bit of code to get me started... but this code doesn't "call out to active directory"
I am trying to create a batch file that runs 3 other batch files. Right now, it works fine using the call command on each other batch file. However, these other batch files take awhile to run. and so the entire process takes a very long time, since each "sub" batch file is run only after the previous one is finished.I was wondering if there is a command or way to start a batch file fro the top-level batch file, then go on and start the next batch file before the previous one is finished. In other words, I want the sub batch files to run in parallel in the background. (similar to the '&' in Unix).
Below is a batch file I created to copy all the files from a program called A5V5. This batch file works to copy the files to two different drives What I want to do is if the J: Directory is not availble (This is a flash drive) that it will copy to the E: directory which is a second HDD and not leave a "The system cannot find the drive specified" when the flash drive is not inserted.
@echo off cd c: cd program files (x86) cd A5V5 cd Ranch Mobile, Inc Copy *.* "E:Ranch Mobile" (This is a second hard drive for backup files only) Copy *.* "J:Ranch Mobile" (This is a Flash drive that is not always inserted) Pause
I like the way batch files work and I can do these simple ones but when it comes to doing the more complicated ones I am at a total loss.
If C: is the root of the virtual machine and U: is the USB stick, I can PERFORM "copy C:folder** U:folder", but that line in a batch file does not work. How can I fix that ?
How to create a batch file that will move files based on the file type?My Requirement : I need a batch file to copy all .doc files in all my HardDisk to aremovable disk say (Z: drive) . Can anyone make it possible using a batch file
Having difficulty with a homegroup and file sharing: one desktop PC with the family's main documents (which are on a separate drive to the system) and two laptops which need to access those documents. I've got them all seeing each other, and they can see the folders in the drive, but when I try to add files or rename files, it tells me that I need permission. I've gone through the advance settings to make sure the correct permission is selected, they all have the same workgroup name and different computer names. Sharing the printer attached to the desktop is fine.
I have searched all over the Internet looking for how to associate certain extensions with certain programs using a .bat file... but no luck. I have spent about two hours experimenting. I'm able to do this from the command prompt: Code: ASSOC .cpp=C++_Source_Code FTYPE C++_Source_Code=E:Notepad2.exe %0 I created a small hi.cpp file to test this. It works perfectly. The command line is E:Notepad2.exe E:hi.cpp just like it should be.
However, doing the same thing from within a batch file yields the command line E:Notepad2.exe E:assoc.bat which opens my batch file when i double-click on hi.cpp... Is it even possible to perform this association from within a batch file? I have a LOT of different file types to register, and i don't want to spend 20 minutes every time i log on associating these extensions by hand.
So, I have this for batch renaming files in a folder: Dir | rename-item -newname { $_.name -replace "oldname","newname" }
And it works like a charm. The thing I can not figure out how to do is add characters - w/o changing any. So let's say I have 3 files: 1.txt 2.txt and 3.txt - I want to change them to be x1.txt x2.txt and x3.txt
So I try replacing 'replace' with 'add' like this: Dir | rename-item -newname { $_.name -add "x", }
But it doesn't work. Is this possible, and if so, what I am missing in my command line?
basically (I'll try to be descriptive), I have an Excel file (extension xlsm) on my USB and I right click it, send to --> desktop (create shortcut). I see the shortcut. I right click and attempt to rename it with a different file extension, but the 'Rename' box doesn't show up like I believe it should and the file name changes without the warning. I need to do this for the shortcut I've created, not the file on the USB.I have 'Hide extensions for known file types' unchecked and 'Display the full path in the title bar' checked, as I believe they should be.
I just downloaded all of the Google Web Fonts and they were each downloaded into their respected folders, so instead of clicking on folder after folder and right clicking after right clicking and finally installing each and every font;
How can I create a command prompt (batch) file so the prompt can search the main folder where all the font folders are, grab any and all TrueType Font files and move or copy them into another single folder?
One directory (Directory A) containing the same files as Directory B but with the wrong Date created / modified attributes.how to make all the files in Directory A have the same date created/modified attributes as Directory B.
I have a 10 files that have all been categorised into about 40 folders. These files have been damaged.I have a backup of all these files, but they are not categorised and sit in a single directory.Does anyone know of an easy technique to batch replace the damaged files with the originals?
English is spoken all over the world. Windows have option of EN (US), EN (UK), EN (IN) etc, I want to copy EN (UK) and rename it with my own country's format (currency, date & time styles etc) as EN (PK)*
Usually, when you create/rename/delete a file/folder in the directory in Windows Explorer, it will add/renamed/remove automatically without refreshing.However, I have this issue where if you do any of the above, it doesn't refresh until you press F5. I tried to see if its a driver issue by booting into Safe Mode but it didn't work in there.
I'm in the habit of making a backup of files before changing them. To keep track of each version of a file, I make a copy and then rename it to include the last modified date. For example, if I'm going to edit bozo.html, I'll make a copy of the file (in the same directory) and rename it to bozo.2010.05.12.html . In Windows Explorer in Windows 7, if I right click on a file and drag and drop it in the same directory, I get a menu from which I select 'Copy here'. A copy of the file is created with the name 'bozo - Copy.html'. Is there any way to change this function to use the modified date of the file instead of ' - Copy' ?
I tried to save a file and got an error on saving it, so I quit the program. The file appears as if it was never saved and doesn't show up in directory listing (GUI or cmd.exe).
However, if I try to rename any other file to that filename, it says "Cannot rename file, because file exists" and appends a number to the end. I cannot remove the number. This happens both in the GUI and cmd.exe as well.
So, basically cmd.exe del says the file does not exist, but ren says a duplicate file name exists....
I have no idea how to delete that "ghost" of a file so I can actually use the filename. I checked folder options and it's not a hidden file or anything like that - it just (doesn't) exist, but it does?
windows 7 home premium sp1 i cannot rename .jpg files. when i right-click the file, the 'rename' option does not appear. normally there is a 'create shortcut' 'delete' and 'rename' option in the list near the bottom but not when i right-click on a jpeg, these three have been curtailed to 'create shortcut'.provenance of the .jpg varies - some come from a camcorder's picture-taking thinggy, some from the 'net, some copied from an other machine,etc but all with extension .jpg opened paint and did a 'save as' (to get the new name )then deleted the original (the one i wanted to rename).
I have a bunch of files/folders that were recovered from a failed disk drive. Some 80% of the files are good but many are named with characters outside the standard ANSI set. I am unable to rename the files or delete them using standard Windows commands.
sounds simple - but under users there is public and myname all i want to do is change myname.the little folder icon has a lock on it home premium version have changed computer name and account name.
I want to install a game on my computer, but I don't want someone to see it. Not even from then control panel. Is it possible to rename/hide the name of the game showed in the uninstaller in the control panel?
I am having a peculiar issue with MKV files - when I attempt to rename or delete these files I am (sometimes) presented with the following error message:
In order to rename the offending MKV files I need to boot into Ubuntu (using a Live OS from CD) and if I want to delete the files I either must use Ubuntu or a "file unlocking program" within Windows (the FileAssassin tool that ships with MalwareBytes is my current preference).
I dragged a web address off and Windows created a shortcut. I was able to change the extension to .txt. The icon changed to that for a text file, and I could open the file and read it.
Since then, though, the url extension does not show up. If I select Rename and add .txt to the part of the filename showing, it evidently retains the url extension after the .txt extension because the icon doesn't change to the one for a text file, I'm not allowed to edit it, and selecting open results in it opening the web page - i.e., acting like it is still a .url file.
I have checked Tools -> View many times and the box for hiding common extensions is unchecked so that is not the problem.
I am having a peculiar issue with MKV files - when I attempt to rename or delete these files I am (sometimes) presented with the following error message:
In order to rename the offending MKV files I need to boot into Ubuntu (using a Live OS from CD) and if I want to delete the files I either must use Ubuntu or a "file unlocking program" within Windows (the FileAssassin tool that ships with MalwareBytes is my current preference).