Delete / Rename Through Batch Files?

May 16, 2011

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.

View 6 Replies


ADVERTISEMENT

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.

View 1 Replies View Related

Can't Rename Or Delete MKV Files

Sep 23, 2012

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).

View 2 Replies View Related

Can't Rename Or Delete MKV Files

Sep 23, 2012

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).

View 1 Replies View Related

Delete Or Rename Files / Folders?

Sep 30, 2011

I have been getting the following error (several in a day) when I try to rename files and/or folders via 'explorer.exe' GUI Now...this happens out of the blue so to speak and despite what the pop up widget says, the file or folder, in this case, was NOT opened in another process. In the above example, I was just trying to 'rename' the folder is all. I didn't even go into the folder at all.

The OS is Windows 7 64 Bit w/SP1 and 8GB DDR3.

The only things I can think of that might be causing the problem are the fact I have an 120GB OCZ Agility II SSD as my system drive with the following optimizations in place

View 4 Replies View Related

Unable To Rename Or Delete Files With Extension Mkv?

Apr 17, 2011

I am able to play files with extension mkv using vlc player. But unable to rename or delete only files with extension mkv

View 2 Replies View Related

Windows 7 Can't Rename / Delete / Move Mkv Files

Jun 15, 2012

My computer has been acting a little weird lately. Recently i've downloaded some .mkv files and now i can't rename or delete or move them. I tried using command prompt and unlocker and it's still not working. It says "action can't be completed because it is being opened by other programme", i don't get this as i close all programmes and it still says the same thing.

My main purpose is to actually move them into another folder. It's only these few days that my computer is acting like this. I can move/delete/rename other avi or mp4 files.

View 5 Replies View Related

Cannot Delete Edit Modify Rename Or Alter Files In Any Way

Dec 22, 2010

i am enraged, i have been having this problem for a bit, i disabled uac, i gave my user account full access permissions on all files and it still says i dont have permission, my hard drive is almost full now and i cannot delete stuff so i just wanna lay into microsoft with the force of 1000 suns

note: the files i am having problems with arent even on the C: drive, they are on my shared partition (i use this partition for documents music etc and just about everything that is not windows only)

View 9 Replies View Related

GROD In Only One Folder, Can't Delete/move/rename Files In It

May 1, 2012

I have a acer aspire 7750G-6634 laptop, 8gb of ram, 2 HDs, i5, windows 7 home (the one that came with the laptop)?Camtasia created a 50+ gb file on my D drive, I struggled to get the file to work but it seems like it was corrupted (couldn't use it) so I deleted it. Since then I started seeing the green ribbon of death when I was browsing folders on my D. It was always getting worse and worse, until one day I couldn't move/copy/delete any files that was on my D. Then I rebooted and my D drive disappeared?I was able to remove it, 30 minutes in the freezer, then I was able to connect it and save some files (maybe 75% of the files), then can't access it anymore.I bought a new HD from newegg (Seagate Momentus ST9750420AS 750GB 7200 RPM 16MB Cache 2.5" SATA 3.0Gb/s Internal Notebook Hard Drive -Bare Drive - OEM) and put the new one to replace the one that died.So far so good, but now I see that green ribbon again, but only on my D and only in my "Downloads" folder, the other folders on the D seems to be fine. I can't delete or modify any files in the Download folder.

*Scanned with Superantispyware
*Scanned with AVG2012
*Replaced AVG2012 with AVAST (Had issue with AVG before and I read it could be the cause of the issue)
*Scanned with Avast
*Scanned with SlimDrivers and updated the 15 drivers that were out of date
*Scanned with Emergency Kit (scan never finishes scanning, get stuck at 97% on 3 different files on the D drive so far)
*Checkdisk on both drives (C and D) 3 times (when booting the PC) 4-5 hours each time
*Defraged both disks
*Uninstalled Camtasia + many other softwares that I installed when the issue started (approx.)
*Used CCleaner and cleaned the registry and other files
*Tried to use Xplorer2 instead of windows explorer = same issue

View 1 Replies View Related

Can't Delete Or Rename Files On External Hard Drive

Jun 19, 2011

I just figured out that I can't delete files from my external hard drive. It's WD Elements 320GB. Only thing I did before this occured is that I converted file system from FAT32 to NTFS via command in cmd prompt, but I'm not sure if that showed up after that. So, I don't have "delete" or "rename" commands on right click. Backup of all files is a no go since I don't have so much free space atm. I use my user account which is also admin account.

View 1 Replies View Related

Batch Rename In DOS Or Windows PowerShell

Jan 15, 2013

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?

View 1 Replies View Related

Create A Batch File That Runs 3 Other Batch Files

Jul 1, 2011

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).

View 1 Replies View Related

Can't Delete/rename Catroot2 Folder?

Oct 16, 2010

I have Windows 7 enterprise with all the updates/service packs appliedWhen I try to update directx it complains about not being able to verify the signature of a cabinet file and asks to check the cryptographic services. I googled for that error and all links say to stop cryptographic services and remove thec:windowssystem32catroot2 folderI stopped the cryptographic services and when I try to remove that folder, it removes everything from inside that folder but the actual folder remains and I can't even enter it after thatWhen I try to remove it or take ownership it says the following:c:WindowsSystem32>takeown /f catroot2 /r /d y

View 7 Replies View Related

Why Can't Delete / Rename Folders In Windows 7 Ultimate

Sep 18, 2011

I have installed windows 7 ultimate, but I noticed when I am trying to delete some files/folders can't execute it, the files or folders targeted to be deleted are unused and totally closed..

View 12 Replies View Related

Can't Rename, Delete Or Move Folder Or File

Oct 21, 2011

Since 2 days, in a certain folder, I cant rename, move or delete folders or files. Now, it has spread to my desktop as well. If I rename a folder, even a new folder, the name changes ''magically'' within seconds to restore to its previous name. If I move the folder or file, it comes back and if I delete it, it restores. I tried to make a system restore, even format (!), the problem persists. I use this folder to tag and rename my new mp3s so I have to be able to 1) rename, 2) move the folders the files and folders in it.

View 1 Replies View Related

Have To Refresh Every Time Delete/rename/move

May 14, 2010

Every time I delete/rename/move a file...the changes are not reflected in the folder until I right click "refresh".

Is there a microsoft approved fix for this?

View 9 Replies View Related

Windows Explorer Doesn't Refresh After Copy / Rename / New Or Delete

Jan 29, 2012

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.

View 1 Replies View Related

How To Write Batch File To Delete Thousands Of Folders

May 16, 2012

Was infected by the matsnu1 virus recently which encrypes and locks all your data files. Got all my files back by running matsnu1decryp.exe You need an original clean file before the virus struck for it to work out how to decrypt all your other files does does save the day. Down side is that you end up with two files. The the original and a locked version. You can just go through your hard drive and delete the locked files but I have a 1TB disk with thousands of files and folders.

Since all the locked files begin with "locked" I was wondering about some sort of batch file that would do this for all folders and sub folders. I am sure I remember doing this stuff years ago with DOS but don't remember enough to try it. Any DOS command for this or some other way of quickly deleting many files which have part of the name which is common to all files. They all have different extensions so cannot use that option. My drive is H:

View 6 Replies View Related

Cannot Rename .jpg Files

Oct 21, 2011

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).

View 6 Replies View Related

Cannot Rename Files With Url Extension

Feb 14, 2012

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.

View 7 Replies View Related

How To Rename Files In Windows 7

Oct 1, 2012

How to rename files in Windows 7

[code]...

View 1 Replies View Related

How To Make Windows 7 Rename The Files

Jan 16, 2013

how to make windows 7 rename the files i download in a series.I can't tell much about the work am going to use this auto rename for much because it's confidential.how i want it to be done.Basically i download "things" from a certain site for a certain use and i want to rename the downloads as something else.Basically, I would like my downloads to be renamed in the series of 1, 2, 3 etc automatically once i feed 1 manually for the first file i download.

View 1 Replies View Related

Move Files - Rename Drive

Dec 17, 2009

I have all my programs stored on the P: drive but its running out of room and the D: drive is available.

Question: If I move all the programs to the D: drive and rename it to P:, will everything run from existing shortcuts?

Is there a simpler migration I am overlooking?

View 3 Replies View Related

'Rename' Box Doesn't Show Up When Rename A File Shortcut

Sep 30, 2012

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.

View 4 Replies View Related

Homegroup File Sharing - No Permissions To Add Or Rename Files

Feb 5, 2011

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.

View 1 Replies View Related

Keep Losing Ability To Rename/Move/Add Files To Internal HD?

Oct 17, 2011

I recently built my first HTPC. Everything works great. I've got a ton of storage for all my shows/etc. The problem is that on my main 2TB HD, I've set up a partition for the OS (Windows 7) and then a larger Ex-Fat partition on the rest of the drive where I store my media. Occasionally, I will go to that partition and will be unable to edit folder titles, create new folders, move anything around the drive or move anything on or off of it. I scan the drive, which forces an unmount of the partition, find no errors, and then remount the drive and everything is fixed.

View 3 Replies View Related

Suspicious 'Undo Rename' And Delayed 'Undo Delete'?

Oct 30, 2011

There are two things which have been bugging me off for some time now: a suspicious 'Undo Rename' in the right-click context menu even if I did not rename anything, and a delayed 'Undo Delete' in the right-click context (I deleted a shortcut from the desktop and it took some time for the Recycle Bin to be filled and an 'Undo Delete' option in the right-click menu to show up).My User Account Control is set to maximum yet there's no UAC prompt to rename something. I didn't recall renaming a specific file(s) as well, all files from my desktop to folders remain "as is" or were unchanged.

View 5 Replies View Related

Associate File Extensions With Batch Files

Feb 2, 2012

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.

View 2 Replies View Related

64-bit Not Running Batch Files/Path Environment?

May 17, 2011

I recently got a new laptop running Win 7 Pro 64-bit and as part of my initial third-party software installations I inadvertently overwrote the 'Path' environment variable (instead of appending to it). I subsequently tried adding c:windowssystem32; to it but don't know if this is doing anything. I have not managed to find any definitive information on what the Path ev should be on a new Windows 7 64-bit install.The thing is I loaded a batch process which I had on another Win 7 (32-bit) system but when I key the bat filename in cmd.exe (without the extension or double-click it) I get this error:"The syntax of the command is incorrect."If I key the bat filename with the extension, it runs but then stops because it seems not to recognize another program which the bat file calls even though I have the Path ev set for that program.

View 2 Replies View Related

Temp Folder Getting Filled With Batch Files

Dec 8, 2011

My temporary folder has been have batch files created in it every 15 seconds or so. My mouse is the arrow with the busy circle at 2'oclock of it constantly, so something is running. I checked my processes and they seemed to all be normal. I updated everything including windows.net 4 so I don't know what else to try.

It is Windows 7 64bit Home
i3 Processor w/ 4gb RAM

And the batch files all have been 6 digits numbers increasing in numbers so it would be like 178521 and the next one would be 178762 etc. There are two conhost.exe running.

View 6 Replies View Related

Windows Batch Files Are Written In Basic?

Aug 24, 2012

This may seem a really obvious question, but aren't Windows Batch files written in Basic?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved