Over 1 million tech questions and answers.

How can the CMDs directory be changed using a batch file?

Q: How can the CMDs directory be changed using a batch file?

I am new to programming and am starting with Java. It is all going ok but it is becoming time consuming typing the "cd" command to change the directory of the CMD to the locations of my Java programs every time I want to compile or execute my program as it defaults to C:\Users\Mike every time I restart CMD.

To save time, I want to be able to double-click an icon on my desktop to run a command which will change the default directory to my programming folder. I then want to click another icon on my desktop to change it back to the original.

Can somebody please give me the basic CMD code for changing the default directory (if there is one)? I will insert my directories afterwards.


Preferred Solution: How can the CMDs directory be changed using a batch file?

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: How can the CMDs directory be changed using a batch file?

Hello GreenLightPC

I don't know about a *.bat file. But, I think I may have an easier way.

Create a shortcut to Command Prompt anywhere you like. In the Shortcut properties, change the Start In: to your desired directory.

Hope this is what you wanted.


Read other 6 answers

I did a search but I coudln't find an answer for this.
I a mtrying to create a simple batch file that offers a user a choice it would simply do an ECHO prompting the user to select either choice 1 or 2, if the user selects choice 1 it would process the xcopy cmd with the /D flag, if the user selects option 2 it would use the same xcopy cmd but without the d flag.

What I am trying to do is simply create a small backup method, the /D being the one that backs up the files tha thave only changed while the straight xcopy cmd would be considered a full backup.

Option 1 - xcopy c:\QUICKB~1 F:\MumBackup\QUICKB~1 /D /E
Option 2 - xcopy c:\QUICKB~1 F:\MumBackup\QUICKB~1 /E

I did some reading on how to do this ,but I am still puzzzled.

A:If Cmds & Batch File

tripped said:

I did a search but I coudln't find an answer for this.
I a mtrying to create a simple batch file that offers a user a choice it would simply do an ECHO prompting the user to select either choice 1 or 2, if the user selects choice 1 it would process the xcopy cmd with the /D flag, if the user selects option 2 it would use the same xcopy cmd but without the d flag.
Click to expand...

not going to code the whole batch for you, but some suggestions.
you can use set /p to get your user input. for more info on set, type set /? on your prompt.
also, for if statements, if /?. If you are on older OS, there is a choice command you can use to get user input.

Read other 1 answers


Kindly furnish me code for writing a batch file for removing folder

thanking you


A:batch file for deleting directory

Hi and Welcome to TSF!

What are you looking for the batch program to do?

You can look here for help: An A-Z Index of the Windows CMD command line | SS64.com

Read other 2 answers

How do I write a printdir.bat file in W 7? I used this file in XP, but I cannot figure a way to do it in W 7.



A:Print Directory Batch File

Welcome to TSG!

Google printdir.bat and here's the first result:
How to add the Print Directory feature for folders in Windows XP, in Windows Vista, in Windows 7

Read other 3 answers

I made a batch file that says this:

@echo off
cd C:\Users\John\Desktop
rename ring.gif ring.jpeg
The actual batch file is saved on my I:\ drive, not my C:\ drive. My I:\ drive is an internal HDD that is able to talk with my C:\ drive. When I execute the .bat file, it does nothing besides quickly opening the command prompt and then closing it. When I take the .bat file and put it on my desktop and run it, it works as it should (ring.gif gets renamed to ring.jpeg). Why doesn't it work when it is on my I:\ drive?

A:Batch file only works in certain directory

You need to add the "/D" switch to cd that might help. "cd /D C:\Path..."

Read other 2 answers

Hi there

There is a batch file that is to be runned from C:\ directory. It is going to install a driver. (The batch file with some other needed files are in a folder)

@devcon remove root\mcamvusb
@devcon install mcamvusb.inf root\mcamvusb

But when running as administrator the .bat file, just the command prompt opens and closes without doing more. If I copy/paste the files to system32 directory and run the .bat file from direcory "C:\Windows\System32" everything is Ok. How can I run the batch file from "C:" drive?

A:Problem with running batch file in certain directory

What is devcon and where does it reside.

For testing, remove the @ in front of @devcon.

Read other 7 answers

I have been running the following batch file first on an XP machine (where it worked) and then on a Win 7 Pro 64 bit machine where it won't.  The c:\Data Files directory is a directory tree where I store all my data files from every application. 
The goal is to copy them at least daily to m:\, a 1TB  USB  NTFS backup drive.  The first time, it took about 7 to 8 hours.  Subsequent times (on XP), it frequently took a minute or less as I copy only the newer files (created or modified).
xcopy "c:\Data Files\Dave's Data\*.*"                                      
"m:\Dave's Data"                /R/D /E/H
I am using the same 1TB USB backup drive with my Windows 7 machine as with my older XP machine.  This command copies all files, directories (including empty), including read-only files, and hidden files from c:\Data Files to m:\

On the Windows 7 machine, the first files to be xcopied seem to copy ok.  They are just stand alone files in c:\Data Files.  But, xcopy then encounters c:\Data Files\Excel Data   and this is where it fails.  xcopy apparently tries
to create c:\Data Files\Excel Data   and quits when it can't do it.&... Read more

Read other answers

Hello everybody -

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 ( HKCU\Software\Microsoft\Office\Common\UserInfo ) equals
the local admin default "UserInfo"


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 HKCU\Software\Microsoft\Office\Common\UserInfo

I found this bit of code to get me started... but this code doesn't "call out to active directory"

reg add HKCU\Software\Microsoft\Office\Common\UserInfo /v UserName /d %username% /f

Would greatly appreciate any suggestions, pointers etc... to help me out

Thank you very much and have a great Friday


A:Batch file that needs to find info in Active Directory

Read other 6 answers

I use a batch files for various maintenance stuff.

Get this: When the batch file (.bat or .cmd), is in ONE PARTICULAR DIRECTORY, the defrag command in it echos endlessly, but doesn't execute. Even if the batch file contains only just the one line.

If the batch file is in any other directory, it works fine.

Of course, I keep all my batch files in the same directory ("C:\Program Files\Bruce"), and I can find nothing anywhere in Windows that should cause this directory to be any different than any other.

Anyone have any ideas? Thanks!

Addition a few minutes later: Now the simple one-line batch file will sometimes work, sometimes not work, when in other directories. This is weird.

A:Solved: Batch file doesn't run correctly in a particular directory

Read other 9 answers

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 "Genesis\Vehicles\truck\diesel\4tonbaker" to "Genesis\Vehicles\truck\diesel\4tonbutcher"

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;
C:\Genesis\Vehicles\truck\diesel\4tonbaker or
D:Genesis\Vehicles\truck\diesel\4tonbaker or even

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 d... Read more

A:Batch file or Exe to copy & rename directory and update files

Sounds like you need a windows shell program, I'm not expert enough to help you with this

Here's a nice tutorial:

Win32 Shell Scripting Tutorial

Off topic: this is trivial to do in UNIX, I can whip up a shell script for that in no time...

Read other 1 answers

Ok folks--here's the deal. We have a client list (not set up by me) that has the client numbers listed as the first part of the folder name. So for example, the folder names look like this:

999 (Smith)
1002 (Jones)
1003 (Johnson)

etc. There's a couple thousand. So I am thinking some sort of DOS batch routine to rename all the folders in the directory. Essentially, remove the numbers and put them at the end of the folder name so it looks like this:

(Smith) 999
(Jones) 1002
(Johnson) 1003

Ideally, I would also like to strip the () and add a "-" so:


But obviously that's not as important because the'll still be in alphabetical order even with the ().

A:DOS batch file to globally change filenames in a specific directory?

Read other 10 answers

I would like to copy all pdf files from  directory 'src' and sub-directories 'src/src-sub1' to directory 'trgt', including the directory structure. Any suggestion? thanks!

A:windows batch script to recursively copy file/directory of a specific patern

I have to use windows batch script and buildin commands. Any suggestion is welcome. Thanks!
Both are available in batch:
Robocopy: http://ss64.com/nt/robocopy.html
XCopy: http://ss64.com/nt/xcopy.html
Don't retire TechNet! -

(Don't give up yet - 12,700+ strong and growing)

Read other 9 answers

I'm using a command line batch file to backup files from my W7 Pro x64 machine to an external USB HD. Basically, "xcopy c:\......\my documents\*.*" "external HD". I couldn't get this to work until I truncated the source directory to "documents" instead of "my documents" [the name that the W7 installer specified]. While the batch file now runs and does what it's suppose to do, I'm mystified as to why the source directory needs to have a truncated name in the batch file rather that the one it has "officially." Any insight into this is appreciated.

A:question - batch file only works with "unofficial" directory name

Hello Robert,

"My Documents" is just a symbolic link to "Documents" for backwards compatibility for older programs that still reference "My Documents". "Documents" is the true folders name. It's the same with all of the "My...." user folders.

Hope this helps,

Read other 5 answers

Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can...

First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg.

Here's the code that I'm using:

ffmpeg -i folder\video.mp4 -f mp3 -ab 160000 -vn "\different folder\music.mp3"

what I would like to do is add to this so that I don't have to write out this code for every file I have... :/

I have the mp4 files in one folder and than the mp3 files are saving to another folder.

So here's an example of what the code will do if it isn't clear yet.

Folder 1:


what it should do is grab video1.mp4 and convert it.

ffmpeg -i folder\video1.mp4 -f mp3 -ab 160000 -vn "\different folder\music1.mp3"

and than move onto the next one

ffmpeg -i folder\video2.mp4 -f mp3 -ab 160000 -vn "\different folder\music2.mp3"

and than the next one

ffmpeg -i folder\video3.mp4 -f mp3 -ab 160000 -vn "\different folder\music3.mp3"

It's going to have to grab the name from the mp4 file and insert it for the mp3 file.

I can get around pretty good in cmd if it's basic commands but when it comes to something like this I'm a little confused...

Thanks for the help in advance!
I'll see what i can do about searching some more on what I would have to do and if I find the solution I'll post it here if it isn't already answered.

A:Batch File that grabs file names from folder to insert into batch file

A DOS "for /f" loop should do the trick, although changing the filename extension for the output to do everything in one line escapes me at the moment.

Perhaps you could do a dir .\folder\*.mp4/s/b > mp4s.txt, then make a copy of that and edit each line to rename the file to the destination name, and save it as mp3s.txt. Then you just feed both the source (mp4s.txt) and destination (mp3s.txt) filesnames into the for /f loop which handles the ffmpeg conversion.

Quite a crude solution and you'd have to handpatch the destination filenames, but i can't think of how to get a source mp4 filename and then just change the extension.

Read other 3 answers

I have a question  that how to copy file from remote desktop user drive to my local machine using  xcopy or any other protocol.

This is my server path "\\Trail01" and here is the file location "c:\Users\ashique.sheikh\Desktop\Day2.R"
How can i give this is in my batch file. I have used this
net use "\\Trail01" "[email protected]" "/USER:ashique.sheikh"
XCOPY /Y \\Trail01\c:\users\ashique.sheikh\Desktop\Day2.R  "D:\VMI"
But its not working. It is give path error.
How can i download this or is there any other way to do it?

Read other answers

Ok guys this is kind of a stupied question but I've been upgrading my usb I made a Autorun that runs another batch program I made called choice. The problem is that if I put the command line:

start "F:/USB Folder"

It opens a Command Prompt Window with the title the location.

I know that if I made choice goto a different folder then put a shortcut of "USB Folder" in that folder with it, it works just fine but I can't because of the folder lock trick. Here's Choice.bat 's code.

@echo off
echo Please Enter Command
echo 1) Open USB Folder
echo 2) Unlock
echo 3) Lock
echo 4) Admin Controls
set /p "c=>"
IF %c%==1 start "F:\USB Folder"
IF %c%==2 goto QUnlock
IF %c%==3 goto QLock
goto end

IF Exist "USB Folder" goto nounlock
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto Unlock
goto end

echo Enter password to Unlock folder
set /p "pass=>"
if NOT %pass%==psycoblast goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" "USB Folder"
echo. >> "F:\USB Folder\~sys~\logtext.txt"
echo. ----------Unlocked_First_Try--------->> "F:\USB Folder\~sys~\logtext.txt"
echo. |time |find "current" >> "F:\USB Folder\~sys~\logtext.txt"
echo. |date |find &... Read more

A:Solved: Batch Directory Help

Welcome to TSG!

Use Start "" "F:\USB Folder"

If the first item on the command line has quotes, Start assumes it is a title, so if you are using a path that needs quotes you have to add the "" first.

You can echo the time and date much easier by using the %time% and %date% variables:
Echo %Date% %Time% >>"F:\USB Folder\~sys~\logtext.txt"
Also be aware that Vista now includes choice.exe, which XP didn't have, so you might end up running that instead of your batch file if you don't specify the .bat extension and are depending on finding your file using the PATH. Usually best to avoid using a name that is the same as an existing command/file.

Read other 1 answers

Any batch file guru's know of a way to add a short string of text to all directories under a main directory within Windows?

As an illustration I would like to rename all directories (folders) under
c:\documents and settings\profilename\main\
c:\documents and settings\profilename\main\jones
c:\documents and settings\profilename\main\johnson
c:\documents and settings\profilename\main\kohl
c:\documents and settings\profilename\main\larson
c:\documents and settings\profilename\main\olson

c:\documents and settings\profilename\main\jones#HC
c:\documents and settings\profilename\main\johnson#HC
c:\documents and settings\profilename\main\kohl#HC
c:\documents and settings\profilename\main\larson#HC
c:\documents and settings\profilename\main\olson#HC

Thanks for any suggestions!

A:Batch directory (folder) rename

Read other 9 answers

If someone can Please help, I just need the Data in the XML tag extracted to Batch File Variable....the rest i figured out and works great for the backup...just need the extracted tags...
thank you

i have a parent directory that contains a sub directory and a XML file that i need a batch to read 2 specific tags then create a Set command in the batch with those 2 lines to create a backup folder with the tags as the names and such. looks like this:

Parent Directory = XML
XML Folder contains > WJFKB02229001.D Folder & Config.xml File

I need to read the contents of the xml "Config.xml" extract the PhaseID Tag data "WJFKB02229001"
Also need to extract the BoxID "D", I don't need anything else on these seperate lines.

keep trying the following For /F command but no luck
[COLOR=red]for /f "tokens=1 delims=[" %%G in ("PHASEID" %path%\%myfile%) DO ([/COLOR]
[COLOR=red]set PhaseID=%%G[/COLOR]
[COLOR=red]echo Phase: %PhaseID%[/COLOR]

and i've searched so many sites and forums with no real help on this one....the data is contained in the xml, weird enough i guess that it's enclosed in brackets "[", which all the forums i read and try it either replies with a blank variable being passed or says it can't find the file at all....



Set PhaseID="[COLOR=red][B][I]Extracted PhaseID from xml[/I][/B][/COLOR]"
Set BoxID="... Read more

A:Solved: Batch File Extract TAGID to Batch Variable? weird

Read other 16 answers

Hey Everyone I've come across another problem today I'm making a file to copy all the files off my camera into a specific folder. I got everything to work fine until I got to the deleteing a directory.

So lets say

I copy all the pictures on my camera to
"C:\Documents and Settings\User\Desktop\My New Pictures\%CFN%"
before hand I set the CFN variable to the folder name I want and use the md command to make it.

Now lets say I want to delete the %CFN% Folder but I don't want to delete My New Pictures

If I go:
rd /s /q "C:\Documents and Settings\User\Desktop\My New Pictures"
It goes and deletes all the subdirectorys like I want but also deletes the My New Pictures Folder which I don't want.

So all in all how do I remove all subdirectories from specific directory without deleting the specific directory?


A:Solved: Batch Remove Directory Command Help

Read other 7 answers

Currently using this script to get random files in a directory:
@Echo Off

set count=0
for /f %%f in ('dir "C:\Folder" /b') do set /a count+=1
set /a randN=%random% %% %count% +1
set listN=0

for /f "tokens=1* delims=:" %%I in ('dir /a-d /b ^| findstr /n /r . ^| findstr /b "%randN%"') do set filename=%%J

echo %filename%
I need to modify it to select a random subfolder before selecting a file in that folder. If anyone can help, I'd be grateful.

A:Solved: Get random folder from directory using batch?

Nevermind, figured it out. Just needed to include subdirectories and tweaked the way the directory is defined so the batch can be run from anywhere.
@Echo Off

set directory="C:\Folder"
set count=0
for /f %%f in ('dir "%directory%" /b /s') do set /a count+=1
set /a randN=%random% %% %count% +1
set listN=0

for /f "tokens=1* delims=:" %%I in ('dir "%directory%" /a-d /b /s^| findstr /n /r . ^| findstr /b "%randN%"') do set filename=%%J

echo %filename%
goto Start


Read other 1 answers

I've tried creating a .bat file to add a directory to a Windows XP machine's environmental path using:setx path "%PATH%;C:\Path\To\Directory"However it isn't working. From what I've read, doing this via the CLI only adds the variable to the path temporarily.Is there a way to permanently doing it? Other than the obvious, longer approach of: My Computer>Properties>Advanced>Environmental Variables>Path>Edit

A:Batch script for ADDING directory to environmental path

Anyone? This has to be possible from a scripting environment...

Read other 1 answers

Hi everyone. I'm a computer dummy so try to bear with me as I explain.

When I used to download digital kits it would download & a download box would open. I could double click and then the windows explorer directory would open. I could then double click the file to unzip and I could copy to folder but somehow I changed it.

Now when I try to download from a digital store it downloads and opens in windows photo gallery which opens all my photos but not that file. I tried right clicking to save but it won't let me, so my paid digital purchases can't be downloaded so I am going to lose those purchases (limited amount of downloads and days allowed).

I checked the default settings for zipped files which shows windows photo gallery is picked (was picassa but I thought trying something else might trigger windows to give me the original default but didn't happen so I just clicked windows photo gallery/notepad/internet explorer which really made my system go wonky and hubby did a system restore to yesterday to get rid of the glitch it caused) but won't let me pick windows internet explorer (its not there in the choices). I tried searching for windows internet explorer and nothing comes up.

Am I going to have to bring my system in and have everything redone? Its frustrating for me b/c I thought when I got the choice to have Picassa as default I thought it meant only photos. I had no idea that it would screw up my whole downloading system. Plus the fact that I made a purchase... Read more

A:Download directory changed

Hello BcGal00, and welcome to Vista Forums.

It sounds like you ZIP file association has been changed. You can use this tutorial below to restore the default ZIP associations in Vista to see if that may fix your problem for you.

ZIP File Support - Restore

Hope this helps,

Read other 3 answers


I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups.

Two questions:
1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd rather keep a standard 'workflow' for other users who use the machine.

2. I'm 'ok' with batch files, but i've never tried to mirror to a different folder each time (automagically). What i'd like to do is have it backup a folder and call it "blah.1" then "blah.2" each time it is run, and then repeat once it gets to "blah.9" so it doesn't keep growing forever. I don't know how to do this.

I realise no.2 is not really for this forum, but someone might know and i might as well ask


A:How to run a batch file at logoff & some batch scripting help please

I found an answer to the logoff/shutdown:
How to schedule a task to run when shutting down windows - Stack Overflow

And the batch file folders:
robocopy - Insert current date in to destination folder structure - Stack Overflow

Read other 1 answers

I recently bought a new Asus K53e which had Win 7 Home Premium installed and it was in 64bit. I wanted a ultimate version so i installed that. It was working perfectly but then i went to drive c and saw program files x86 and i didnt i was confused because i didnt want it. I havent touched that folder but then i started researching on how to make all my softwares get installed into the 64bit (Program Files) so sevenforums and other sites told me to go to regedit and change the programfiledir to the one you want so i just removed the (x86) and saved it. I also change ProgramW6432Dir, ProgramFilesDir (x86), and ProgramFilesDir to just C:\Program Files (Value Data). So then i installed adobe cs6 master collection and some programs failed to start. I got the message: C:\Program Files (x86)\adobe\adobe dreamweaver cs6\dreamweaver.exe The specified path does not exist. Check the path, and then try again. | So now this has happened to adobe cs6 master collects ( some of them like dreamweaver ) and some other softwares. can someone please help me? I also forgot what the original ProgramFilesDir, ProgramW6432Dir and ProgramFilesDir (x86) was set to.

A:I changed my default installation directory! Help! Please :)

Quote: Originally Posted by AriaTV

so sevenforums and other sites told me to go to regedit and change the programfiledir to the one you want so i just removed the (x86) and saved it. I also change ProgramW6432Dir, ProgramFilesDir (x86), and ProgramFilesDir to just C:\Program Files (Value Data).

Where on this site did you get instructions to change the default installation directories or do any of that stuff you list?

You should have left it alone and resisted your impulses.

ProgramFiles (x86) is the default installation location for 32-bit programs

ProgramFiles is the default installation location for 64-bit programs.

Leave it alone.

I'd guess you can look forward to a clean install to undo the complete mess you have made.

Read other 3 answers

Hello -- I am running a robocopy job to mirror my D:  drive (data drive) to
folder on my external usb drive with 

robocopy d:\ x:\d-drive /mir

after the job finished, the folder x:\d-drive is now hidden and has the system
attribute ---

Does anyone one know why this happens?

Read other answers

I have a laptop running Windows 7 Enterprise using bitlocker with TPM.  The laptop battery ran down and now after recharging the battery bitlocker is asking for the recovery key.  The problem is the key we saved when installing bitlocker doesn't
have the same key id.  Something has changed.  Any ideas on how to recover when the key id is not the same?

Read other answers

Hi guys, so I have a little problem, I've downloaded FileTypesMan because I wanted to change the .exe files appearance on my computer.

I did this using this program - all .exe file icons changed, however, with them changed ALL the shortcuts to all the programs that I have on my laptop - now they all look the same.

I can't figure out how to change it all back.

Any help would be greatly appreciated.
View image: Capture - how my Desktop looks now

A:Programs shortcuts'icons changed when changed exe file icon appearance

Hello Max, and welcome to Seven Forums.

If you like, you might see if downloading and merging the .reg file for the listed exe item in the tutorial below may be able to help. It'll restore the default association and registry entries for exe files.

Default File Type Associations - Restore

Read other 3 answers

LIke an idiot I changed a associate file and it has turned everything into a lnk so I cant open any programs or anything at all any solutions would be greatly appreciated

A:Changed a file Association and it changed everything to a link file

Hello KnightSaint, and welcome to Seven Forums.

You could use the tutorial below to download the file extension that you changed to restore it's default associations.

Default File Type Associations - Restore

Hope this helps,

Read other 3 answers

My laptop was going through a file reset but then suddenly turns off. After it says other user and I wasn't able to get in. I found a YouTube video that helped me get it to a trouble shoot and then reset it to safe enable. When I got in the whole screen
was black! I was able to get it the cmds but not sure how the cmds work. It states C: \Users\Administrator> right now and now I am stuck here.

Read other answers

Hello everyone,

Firstly I would like to say that this seems like a swell enough forum as is and I am frankly out of ideas. About a year ago I had backed up a rather large series of files under one name for my roommate who was in the process of doing some "spring cleaning" on his computer. Fast forward to now and he is out of Hard-drive space damn near and has been unable to find the reserve file himself. Below is the directory under which I named and saved the around 200gb file of games and old-ROTC documents. Regardless the file needs to be found and even after un-hiding all files from the control panel, I have yet been able to locate it. It would seem to be simple enough, one would think that you could see the file name sitting above Program Files but it is not. Any one have any ideas, we would rather not have to reformat/ system restore if we can avoid it.


A:File path error/ Cannot find file directory/file itself

I used a software called TreeSize which shows the size of all folders on the disk. Thinking that the Windows OS is around 18gb, a 200gb files should really stick out with TreeSize.

Read other 1 answers

Hi all,

Any idea how to write Batch File .bat to copy file from File Sharing & FTP Hosting to local directory.

Current the File Sharing & FTP Hosting is SMARTFILE.

I don't want to use WINSCP as the connector.


A:Batch File .bat to copy file from File Sharing & FTP Hosting

Hi Chacha,

Give this batch file a try. All text in red, you should adjust before running.

@echo off
echo.lcd C:\Some\local\directory
echo.cd /Some/server/path
echo.get Some_file_to_download.txt
) > "%TEMP%\_%~n0.ftp"
ftp -s:"%TEMP%\_%~n0.ftp" ""
del "%TEMP%\_%~n0.ftp"

Read other 1 answers

Hi all,
I need help to create windows batch file for following requirements.
1. Remove .txt and .log file format in sub folders.
2. Zip individual file inside any sub folders and give file name through command prompt. 
3. Create sub folder zip file include file zip

Read other answers

Hello All.

I am trying to create a batch file that calls other batch files (device simulators).

The problem I am having is the batch file will not continue until the the call terminates, is there a way to continue it after the call (the batch only terminates after the user exits the simulator).

Thanks avamore

A:batch file: batch within batch

Welcome to TSG!

Use Start. The first set of quotes is for a title. It's needed in case the file name/command needs to be quoted, as in the 2nd example.

Start "" batch.cmd

This will open in a 2nd window. If the batch file you call doesn't use the Exit command that window may remain.
In that case use this instead:
Start "" "cmd /c batch.cmd"

Read other 1 answers

Hi guys,

I'd be eternally grateful if you could help me in any way!

OS: Windows Vista
Machine: Acer Aspire 5715Z laptop

Unfortunately a family member used my machine, and since then the machine has become infected with a virus (or two...). They used Firefox, and downloaded some software that they subsequently deleted, so I can't be sure what it was.


Open an IE window > extra tabs are opened with a random IP address in the address bar (all beginning 8).
Try to close IE > other IE windows are spawned.
Open Windows Explorer > Task bar disappears and Windows Explorer immediately closes

The symptoms can be temporarily relieved by disabling the processes in the Startup tab of MSConfig (named cmds and BM1fa22c55), and deleting the Registry entries at HKCU/SOFTWARE/Microsoft/Windows/CurrentVersion/Run. The virus is creating a couple of obvious dlls in the following locations (although I know next to nothing about dlls/viruses etc.!):

Rundll32.exe "C:\Users\Emily\AppData\Local\Temp\myqxuect.dll",s
rundll32.exe C:\Users\Emily\AppData\Local\Temp\wvuSjgDW.dll,c

I cannot delete the files as I get the old "the file is open in another program". When deleted from the registry, the two main culprit dlls reappear immediately. I've seen the name "MS Juan" in the registry, and also in autoruns/processexplorer - is this the actual virus? Lavasoft Ad Aware SE Personal reported a total of 5 other viruses/trojans that I marked t... Read more

A:Solved: cmds and MS Juan

Read other 16 answers

Respected Person,
Whenever I am switching on my computer, I find the display- CMDS TIME/ DATE NOT SET. thereaffter I need to go to Adjust Date/Time section. why this problem arise and how to solve it?


Boot into Setup (Bios or CMOS) and adjust the time and date Save and Exit. When you boot into Windows make sure you are in the right time zone. If your computer continues to loose time, you will need to change the CMOS battery on the motherboard. .

Read other 1 answers

I'm in the process of repair/recovery of my machine (Dell Inspiron 8500 with Windows XP Home, Service Pack 2). I'm following exactly the instructions in: http://attachments.techguy.org/attac...chmentid=62075, but a problem has developed. The "software" file (which is the file that the original blue screen error message says is "corrupt, absent or not writable") will not copy to the new tmp directory to create the backup. My understanding from the article is that this backup file (software.bak) will later be used to restore correct settings for various software applications. Since I can't copy it, it appears that I am screwed, no? Or is there a way out somehow?

Thanks to anyone who's been there and can help...

BTW I have the XP installation disk that came with, and a diagnostics disk which I have not yet run.


A:Blue Screen: Registry File Failure; can't copy corrupted file to tmp directory

Never mind, I had it wrong--didn't read the document referred to above carefully enough. The procedure worked like a charm, and the document is very easy to read and entertaining to boot! (pun intended).

The document describes a procedure that closely follows a Microsoft KB document (which I now can't find) but does not contain any warning regarding whether the OS is an OEM (original equipment manufacture) install or not. The Microsoft doc says not to use the procedure on an OEM-installed OS, but I just did it on my Dell, so that warning seems to be incorrect.

Many many thanks for the help provided by this document and this site.

Read other 1 answers

I'm trying to recover an entire terabyte, and I don't want a recovery software which will scrap filenames and file structures, leaving an unintelligible mess to wade through. Is there a software which will preserve file names and structures, and possibly allow me to restore only particular directories?

A:Is there a file recovery software which preserves file names and directory structure?

have a look at this one


Read other 1 answers

I cannot copy or paste jpeg files from my computer to my SD 2GB cards. Also, I get this msg when I try to print jpeg files. Using Adobe Elements I am able to archive these files. Oddly enough I can attach and send these jpeg files via email. Prior to August '08 was able to do these tasks without a problem. I suspect that there is a software compatibility problem since this problem came on suddenly (maybe iTunes?). No problems importing jpeg files from SD cards. I've looked at several sites on the internet but none seem to have the right solution for my problem. THANKS for any help that you can provide! -Stu

A:Error copying file or folder; cannot copy img the directory or file cannot be created

This has caught me more than once.

The problem is a limitation on the number of files and folders allowed in the root folder of a FAT16 file system (as for a memory card) of 512. (Note, this number is reduced much further if longer file names than 8 characters are used, as most people will want to).

When transferring the files onto the card, new files will be rejected when you hit this limit.

So keep your files in separate folders, so they are not all in the root folder.

For files and folders in root it might be worth keeping your filenames under 8 characters in length so you can use the full 512 files on root folder.

Read other 3 answers

I'm trying to recover an entire terabyte, and I don't want a recovery software which will scrap filenames and file structures, leaving an unintelligible mess to wade through. Is there a software which will preserve file names and structures, and possibly allow me to restore only particular directories?

A:Is there a file recovery software which preserves file names and directory structure?

Hmm; Normally any backup software would do this for you.

If you had a secondary copy (say other media to which you did a copy), then this would be a snap.

It sounds as if you only have the original media and you need to recover "whatever is possible".

Read other 2 answers

I've been searching the web on how to accomplish this but am coming up empty handed so I am hoping someone here can help...

I want my batch file to read a random line from a text file into an environment variable - can this be done?

I am using Windows 2000.

A:Batch File -- Read Random Line from External File into an Environment Variable

Read other 6 answers

Dear All,

I need to create a batch file which can read the size of file(e.g. 1kb, 2kb...etc) from specific folder and detect 0kb file and convert it to text file (showing 0kb file size) with alarm.

I am not really sure how to write command for this batch file. Please help :-(

A:How to create a batch file to read size of file on specific folder path

Read other 10 answers

I'm working on a batch file that will download a file I maintain, look for a string of text, and if it doesn't find the string, rename a file or folder, or change the file or folder's attributes to read-only.

I think I can handle the last part, and I already have the ftp part done, but I am having a hard time finding any good resource for the text string lookup/IF statement.

Any help is greatly appreciated. I'm new here, please excuse my ignorance if I am posting in the wrong area or violating any rules.


A:Batch file to compare text and rename file or driectory on fail

Read other 6 answers

I created this batch file to log certain users logins. It creates a text file to log in, but doesn't populate any of the data to it. Could someone please take a look at it and see what I did wrong. I'm new to writing batch files.

Thanks in advance. Here is the code.

@echo off
set target=JDoe
if %username% == target echo %username% %date% %time% %computername% >> c:\logfile.txt

A:Solved: Batch file creates text file but does not populate data to it

target is a variable. You have to surrournd it with %% like any other variable.

C:\>set target=Squashman

C:\>if %username% == %target% echo %username% %date% %time% %computername% >> c:

C:\>type logfile.txt
Squashman Fri 05/23/2008 10:34:14.74 BUMBLE-BEE



Read other 3 answers

I am trying to write a batch program the list the current directory files that end in *.dwg
into a file on my C drive.
I have used the following code:
dir *.dwg /b >C:FileListing.txt
start notepad C:FileListing.txt

This code only gives file names in the current directory.
I need to have a list of path and file names in the file FileListing.txt
Is there a way to do that without including subdirectories??

Thank you,

A:Solved: Batch file to list file names in current Folder.

Read other 9 answers

I am wondering if anyone can provide the equivalent to this linux script. When run against a text file with one entry per line being the name of a directory, it deletes the named directories.

On linux, I run this against the text list.
while IFS='' read -r line || [[ -n "$line" ]]; do
rm -R $line
done < "$1"

I am not sure how to make it do the same for Windows. I can do this, but I'm hoping there's a way to delete based on what's in the text file. Also, wouldn't want it to prompt for deletion of each, but to just delete.

@echo on
cd \
dir /D /N 0
for /D %%f in (XX*) do rmdir %%f /s
%comspec% /k

Thank you

Read other answers

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 a removable disk say (Z: drive) . Can anyone make it possible using a batch file?Please...Its urgent...

A:How to create a batch file that will move files based on the file type

Download XXCopy
XXCOPY, A Versatile File Management Utility --- Boldly Extended Xcopy
This is a vastly improved and extended version of DOS XCopy
Sorry, can't remember the syntax, but its quite simple if you read the manuel carefully :-)
Put the command line in a .bat file and it will run

Read other 4 answers