Over 1 million tech questions and answers.

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

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

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

RELEVANCY SCORE 200
Preferred Solution: How to create a batch file that will move files based on the file type

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 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
RELEVANCY SCORE 109.2

I have a folder with thousands of filenames like this. I need to put them inside folders and remove the useless parts from the filenames. I need to do this before adding the files inside my XBMC library.

[ www.AnnoyingSpam.com ] Some.File.Name.With.A.Very.Long.String.avi
[ www.AnnoyingSpam.com ] Another.File.With.A.Very.Long.String.mpg
[ www.AnnoyingSpam.com ] Again.And.Again.mp4

- First, I want to strip the AnnoyingSpam.com tags in the files
- Then, create a folder based on the file name without the tag and without the extension
- Finally, move the file to the new folder
- Repeat for the rest of the files in the root directory of the batch file
So far all I got is a script that will create folder and move files. But it adds the tag "Folder" to each folder and it doesn't remove the AnnoyingSpam.com tag






Quote:
@echo off

for /f "usebackq delims=?" %%a in (`dir /a-d /b`) do (
if not "%%~dpnxa"=="%~dpnx0" call :func "%%~a"
)

goto :EOF

:func
set file=%~1
set dir=%file% Folder
md "%dir%" Folder 2>nul
move "%file%" "%dir%"
goto :EOF


So my question is how can i remove these strings from the folder names that are being created in the above script:

"[ www.AnnoyingSpam.com ]"

" Folder"

Read other answers
RELEVANCY SCORE 108.4

Hi, i need some help creating a batch file.

What i want it to do is to copy the folder structure of a specific folder, and then move the files and folders to the newly created folders.

As of right now i have this code:


Code:

echo on
xcopy "C:\Users\Test\Desktop\Origin\*" C:\Users\Test\Desktop\Destiny /T
move "C:\Users\Test\Desktop\Origin\*" C:\Users\Test\Desktop\Destiny/
pause
Currently it creates the folder structure, but only moves the files in C:\Users\Test\Desktop\Origin\ and not it's subfolders.

Any help would be appreciated

A:Create a batch to move file and folders

Sorry, my mistake.

Read other 3 answers
RELEVANCY SCORE 106

hi so work in an recruitment office and im trying to create a batch file that the computers can run on a schedule to create a folder with that days date on it and move all files from the desktop to that folder( also created on the desktop), i want the code to only move files and leave folders and shortcuts unaffected

this is what i've got so far.






Quote:
cd desktop

for /f "tokens=1-3 delims=/" %%a in ("%date%") do md "%%a_%%b_%%c"
mkdir c:\users\training\desktop\%date:/=%

MOVE c:\users\training1\desktop\*.* c:\users\training1\desktop\%date:/=%


right now it is making the folder but not moving anything i know it has something to do with the \%date:/=%

il need this batch file to run from a hidden location so that 1. the students dont mess with it and 2. so the batch doesn't move itself from the desktop. also the computers all have different user names so if i could get something that will make "training1" what ever the current logged in user is so i don't have to rewrite the batch for each of the 60 or so computers we have.

A:batch&task to create new folder and move all desktop file to it

Especially with files and folders I find AHK easier to figure out than batch. You can download the free AutoHotkey scripting language here:
AutoHotkey

Here is a script to get you started. I commented out the actual deletions. You can run it and see the desktop files that would be moved in a msgbox. Each loop it asks if you want to quit to escape the tedium. Once you are sure it will work as expected comment out the lines with msgbox and uncomment the FileMove line

If anything gets moved into the folder that shouldn't be you can just drag it back during testing. The variable A_Desktop is the user's desktop directory so the script should work without editing as far as that goes.

Note: free to use at your own risk.


Code:
FormatTime,FolderName,,yyyy_MM_dd
FolderName := A_Desktop "\" FolderName
FileCreateDir,%FolderName%
Loop %A_Desktop%\*.*
{
If (A_LoopFileName = "desktop.ini")
continue
If (SubStr(A_LoopFileName,-3) = ".lnk")
continue
; FileMove,%A_LoopFileLongPath%,%FolderName%
MsgBox % A_LoopFileName
MsgBox, 4388, Quit Loop, Quit Loop?
IfMsgBox,Yes
ExitApp
}

Read other 5 answers
RELEVANCY SCORE 101.2

Hi all,
I have the following batch file :

@echo off
for %%a in (*.xml) do (
findstr /c:"<national-code>Y03051</national-code>" "%%a" >nul && move "%%a" "d:\david\result\"
)

this moves the files nicely however what if i wanted to supply the Y03051 myself. e.g. I run the batch file, it should ask me for the code, in the example Y03051, which I would input, press enter it should then move all those files containing Y03051?

I have done it in the past but I cant remember how to do it.

Also how easy is it to move this script to powershell

Read other answers
RELEVANCY SCORE 100

Hey All, I just joined this forum to find some help on a specific topic that I've been researching for like two hours now on google. I have a list of 1300 files that I need to move from one location to another (move not copy). I've found this batch file created by Neutron16 which performs a Move but it's all gibberish to me. How would I modify it to move the files to location "C:\Archive" There's about 4,000 other files in the same folder.

Thanks in advance

A:Batch File to Move a list of files.

Welcome to SF. That's a copy script. Changed it to a move script. You will need to specify the directory of origin. Also, change extension to "bat"

Read other 4 answers
RELEVANCY SCORE 100

Hi guys
I'm new here, please help

I have about 2 million email files that i want to convert into mbox files.
but the tool i used only can convert every 15.000 files.
so i need a batch file that can move this 2 million files into another folder (15.000 files each folder)
and the folder name is automatically created (counter).
example:

folder 1 contain 15.000 files
folder 2 contain next 15.000 files
.....
folder 134 contain the rest of files ...

note:
2.000.000 / 15.000 = 133,333 so there will be 134 folders

if can, i hope the files will be renamed too ... (adding ".eml")
example: file name 12345678.123456.abcde moved and renamed to 12345678.123456.abcde.eml

i already have the solution for linux, but i do not have any idea in windows

please help
and sorry for my english

thanks

A:[Help] Batch File move every 15.000 files to another folders

Are you going to do this on a regular basis?

Do you want only 15,000 files in each folder or would you prefer to have all of the files in one folder?

Are the files currently in different folders?

I think you can just copy the files to a new location renaming them in the copy process
You have to use copy in Command Prompt, you cannot do this in Windows.

Try this as a test:
Make two new folders to test the process. They can be any name in any location, but I'll use C:\DirA_Src and C:\DirB_Dest as examples
Copy a few (20?) files that you want to rename to C:\DirA_Src folder. If the files have different extensions, that would be a good test.

Launch Command Prompt
Navigate to C:\DirA_Src and list the contentscd C:\DirA_Src
dirThe try a rename with copycopy *.* C:\DirB_Dest\*.*.emlThat might be difficult to decipher so I'll put the strings on separate lines
copy
*.*
C:\DirB_Dest\*.*.eml

The command has to be entered on one line, just know that there is a space between each string I show on separate lines. Also be aware that a space in the new folder names will require parenthesis around the folder name, so I recommend not having any spaces in the new folder names (note that I used the underscore character)

If that does what you want, then you can use the process to copy all of your files to any folder you choose.

Try it an let me know if it works or if you have other questions.

Read other 9 answers
RELEVANCY SCORE 98.8

Does anyone know of a way to do this...

I have a bunch of files under a main folder... call it.. "FolderX".. under folderX are sub folders.. say... "Folder1" "Folder2" etc.. under those folders are "Folder1B" "Folder1C" etc...

I want to move files out of those subfolders and into the root of folderX..

I'm guessing a vbs script could be written but i'm not sure on this?

Anyone have any examples of how to do this?

Thanks

Read other answers
RELEVANCY SCORE 98

Please excuse me in advance because I am not very experienced making batch files. I'm not asking for a free lunch and would gladly paypal someone some cash for a working batch file.

I have a parent folder that contains several subfolders. Each subfolder has several files in them. I need a batch file to search all the folders starting from the parent folder for files contained in a list.txt file and if it finds a match create a new folder where each file was found and move the found file to that folder.

File names in list.txt: (no extension)

test1
test2

Before batch run:

Parent
|--Sub
| |--test1.zip
| |--foo.zip
| |--foo1.zip
| |--foo2.zip
|
|--Sub2
| |--test2.zip
| |--foo.zip
| |--foo1.zip
| |--foo2.zip

After batch run:

Parent
|--Sub1
| |--NewSub
| | |--test1.zip
| |
| |--foo0.zip
| |--foo1.zip
| |--foo2.zip
|
|--Sub2
| |--NewSub
| | |--test2.zip
| |
| |--foo0.zip
| |--foo1.zip
| |--foo2.zip

I have made every effort to do this on my own and keep failing.

Thanks in advance.

Read other answers
RELEVANCY SCORE 96.8

I need to create a batch file to delete folders and the files that are in them. I have an application that is blowing up users profiles, not allowing them to log off until they reduce the profile size. Until I get a resolution from the application support team I need a batch file that I can send them that will delete two folders. Here is what I have to far and it is not working:

@echo off
deltree /y C:\Documents and Settings\SidesRJ\Documentum\ucf
deltree /y C:\Documents and Settings\SidesRJ\Documentum\cta
exit


Any help would be appreciated

A:Create a batch file to delete folders and files

deltree is a DOS/Windows 9x command.
In Windows NT 4 and higher (2000, XP, Vista, 7), you use rd /s (subdirectories)
If you want to do it without prompt you'd use the /q (quiet) flag
if you want to run it on different users' computers (with different usernames) use environment variables
to know what they are, open a command prompt window and type set
to access specific variables, use the % sign
for example in my computer, if you type %temp% in the address bar, it'll take you to that folder.

Read other 1 answers
RELEVANCY SCORE 96.8

How do I create a batch file to convert all of my iPod Photo Cache all at once to jpeg. I have SmartIV ImageZipper Image Converter 1.0.2. I have read how to use other software to do this but I can't figure out the command with this software. I have no experience running batch files so please be specific. I made a folder on my C: drive named Thumbs that have all of the folders/files in it. My software is in the Programs (x86) folder. This PC/Windows(C/Programs(x86)/SmartIV/ImageZipper/imagezipperPic FileConverter.exe.These are the instructions I saw:

This link is no longer valid & I already had conversion software that works but you have to do it a folder at a time.

Download http://www.4shared.com/file/50707723...iThmbConv.html
Now follow these steps:
1. Create a new foder called Thumbs as a subdirectory of your hard drive. I assume this your C: drive. (example C:\Thumbs)
2. Copy all the .ithmb files into this folder.
3. Download the iThmbConv program file directly into this folder.
4. Now, on your pc desktop, go to Start, Run and enter cmd in the box. Hit okay.
5. When the black screen command prompt comes on, type cd.. at the end of the prompt line. Press Enter.
6. The next line should only show C:> If not, enter cd.. again to just show C:>
7. Now type *cd Thumbs* When you press enter, the next line should be C:Thumbs>
8. Assuming one of your .ithmb picture files is named T100. (They are all T and a number, so I'm using T100 as an example) Now type *iThum... Read more

Read other answers
RELEVANCY SCORE 96.8

My files have a format of "ID_date_time.d7d?
Ex: 11111-5_2013_10_07_142149.d7d
The ID is 1111-5 and was tested 10/7/2013 at 2:21:49 PM and the file extension is always .d7d

The local files are automatically saved here by the program generating the data:
C:\Local\Data

I want them copied to the following directory:
E:\common\UserGroup\UserLocation\Test Data\(ID)
For the above example, it would be copied to: E:\common\UserGroup\UserLocation\Test Data\11111-5


Then, upon successful completion of copying the file, I want the file moved to:
C:\IDArchive\Data\Old Data

Then the file should be removed from the original Local folder.

I can do most of this with a batch file, up to the point where I match the file in the Local\Data folder to its proper destination using its ID number. I need to pull the ID number out of the file name and use it to identify its destination - all of the destination folders already exist. I can't figure out the correct code in the batch file to find the ID number and then extract and match it to its folder.

Help?

A:Move files from original folder to existing folders - w batch file?

Hi Jordansl,

Here's a full solution to the task you mention. A double For /F loop is used to extract this ID from each file name.


Preview:

Code:
@echo off

REM For each file in %source_location%, copy it to
REM %copy_to%\*ItsID*, then move the file to %move_to%.

set from_source="C:\Local\Data"
set copy_to="C:\common\UserGroup\UserLocation\Test Data"
set move_to="C:\IDArchive\Data\Old Data"

pushd "%from_source:"=%"
for /f "delims=" %%A in (' dir /a:-d /b %from_source:"=% ') do (
for /f "tokens=1 delims=_" %%B in ( "%%~nxA" ) do (
for %%C in (%COPY_TO%) do (
if exist "%%~fC\%%~B"\* (
copy "%%~fA" "%%~fC\%%~B"
) else (
echo.& echo A destination directory for the file '%%~fA' does not exist.
echo Would you like one to be created for it with the file '%%~nxA' copied to it?
echo If N, the file will not be copied or moved.
choice & if not errorlevel 2 md "%%~fC\%%~B" && copy "%%~fA" "%%~fC\%%~B"
)
)
)
if not errorlevel 2 move "%%~fA" "%MOVE_TO:"=%" || echo.
)
popd

Read other 1 answers
RELEVANCY SCORE 96

Hi All...
I will explain what I need in as much detail as possible.
I need a batch file to move specific files into a separate folder,possibly by opening my hex editor,searching for the word "body" ( without the quotes ) and if found ,close hex editor,move file to a folder called "moved" ,then go on to the next one.If the word "body" is not found just close hex editor and ignore the file.
I have approx 900 files in a folder.One is a vehicle and one is a map for a game.They are mixed together and the only way of telling them apart is by opening each one with my hex editor and search for the word "body",which means it is a vehicle.If the "body" word is not found,it is a map.Example wording of the files: mapname.idf carname.idf
Manually this process would take hours,even days.
It would be a lot better if there is a way of doing this without using the hex editor/batch idea.
Here is a link to one map and one vehicle file if needed for an example:
http://vnovak.com/1nsane/2idf-files.zip
Thanks a bunch for your help!
Val

A:Batch file to Sort and Move specific files by identifying word inside

All files are in 1 folder now? If so tell me the folder name plz.

Read other 9 answers
RELEVANCY SCORE 94.8

Is there any body who can create a batch file to install multiple  *.msu  files in running system (windows 8.1/windows
7sp1)?

A:Create a batch file to install multiple *.msu files in running system

See the article below, basically you can use the WUSA command line to install your updates quietly.

http://support.microsoft.com/kb/934307

Be kind and Mark as Answer if I helped.

Read other 3 answers
RELEVANCY SCORE 92.4

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
RELEVANCY SCORE 92.4

More as an alternative to twiddling my thumbs than anything else, I tried to produce a batch file that would count up the number and size of files in a folder, as well as the number and size of files with each extension. Hence it would say how many word documents I have and how much space they're taking up, etc.

I've managed to get a vaguely working model, but the output formatting is terrible (I just wanted it to say X bytes in Y "Z" Files, none of that ugly dotted variable names) and I have failed to get it to equate .htm and .html, .jpg and .jpeg, etc.
Code:
@ECHO OFF
REM THIS BATCH FILE ITTERATES THROUGH ALL THE SUBFOLDERS AND FILES IN A FOLDER (IDEALLY A DRIVE)
REM IT TOTALS THE NUMBER OF FILES CONTAINED IN THAT FOLDER, AND THE SIZE OF THOSE FILES.
REM IT ALSO TOTALS THE NUMBER AND SIZE OF FILES WITH EACH EXTENSION IT ENCOUNTERS.
REM ALL INFORMATION IS THEN PRINTED TO THE SCREEN AND FTYPEDST.TXT

IF EXIST FTypeDst.txt ERASE FTypeDst.txt
ECHO. >FTypeDst.txt
ATTRIB +A FTypeDst.txt

ECHO SCANNING FILE TREE FOR FILE EXTENSION DISTRIBUTION
ECHO Please Wait Paitently. . .

(SET /A ALLNUMBER = 0) & (SET /A ALLSIZE = 0)

REM cycle through the current directory and subs, Increment Allnumber, Allsize, define and increment Number of * files, size of * files.
FOR /R %%F in (*) DO (
SET /A ALLNUMBER += 1
SET /A ALLSIZE += %%~ZF
IF NOT DEFINED Number.of.%%~XF.files (SET /A Number.of.%%~XF.files = 0)
IF NOT DEFINED Size.of.%%~XF.files (SET /A Size.of.%%~X... Read more

A:Solved: File Type Distribution analysis: Batch File.

Posted via Mobile Device
You would be better off using third party software that already does this. Plenty of them out there.
I personally would check the extension of each file using the cmd extensions of a for loop. then do an if statement for each file type you want to keep track of. then use a call statement to branch to a function that adds up the file sizes and number of files.
 

Read other 3 answers
RELEVANCY SCORE 92.4

If anyone can help it will be greatly appreciated,I am taking A + Essentials and my instructor isn't explaining it,

A:How to switch file type name to contents using a batch file for notepad

If you are as it appears you are paying for a Course for a Comptia A+ certification and the teacher isn't doing the job why haven't you gone to the school and asked them to switch you to a course with a different instructor? Or Demand a refund?

When I got my A+ back in 2000 it wasn't that hard to pass. I believe it was two tests and I was over 95% on both with no training course. I was experienced in computers and doing things and They did have a sample test as I recall it.

And of course that old standby Google
http://www.google.com/search?sclient=psy-ab&hl=en&site=&source=hp&q=A+%2B+Essentials&btnK=Google+Search

I'm afraid I can't help you further as the tests have changed a lot over the years.

Read other 1 answers
RELEVANCY SCORE 92.4

I would like to know if there is a way to open a file in a program. Basically I want something like this (this is totally wrong):

open "C:Users\*My name*\My Documents\run.swf" in "C:\Program Files (x86)\Mozilla Firefox\firefox.exe

Thanks
 

A:Create a batch file to open a certain file in a certain file

The more standard way to do that is to use the start cmd. You call the program first and the file name second.

start "" "c:\windows\notepad.exe" "c:\somepath\logfile.txt"
 

Read other 2 answers
RELEVANCY SCORE 91.2

Basically the title. Almost every single time i move ANY file or delete any file, the window im in freezes and the progress bar freezes. Now when i create a new folder the window im in freezes also, but i'd say its only 50% of the time. The temporary solution i found was to go to the task bar, end explorer, and restart it using run. Now when i check back on that folder, whatever action I did (ie delete file) does do what i wanted, its just the freezing. I'm looking for a permanent solution to this and any insight would be greatly appreciated.

A:Create New folder, move file, delete file. Explorer Freeze

Hi erod49, try looking in your error logs. You have given a good discription of the problem. Tel us your system specs as well.

To get into your error logs,

Left Click on Start Menu.
Right click on Computer and choose manage.
Click on the event viewer.
You now have loads of options to try and pin down what is happening.
Expand the error tab.
Look for things in the last 24 hours.

Other things to look for are updates, has an update caused this. Has your computer autoupdated any of the motherboard drivers.
Have you tried to restore the computer before the error started or has it always been like that.

Read other 10 answers
RELEVANCY SCORE 86

Hi. I need help creating a .bat file that compares 2 same file on 2 different computers (server and client) on a LAN network..
It compares the same file on a server cpu, and there are 4 possible conditions i think:
- Same date on server > then do no action
- Older date on server> no action
- Newer date on server> action, sync using goodsync command line (i'll work on this)
- Connection with the server down > no action
So it's like this :
abc.txt on client 11/01/12
abc.txt on server 12/01/12

then sync

My question is, how exactly do i compare file on a LAN network?
thanks
 

A:Need help creating a batch file based on last modified date..

Welcome to TSG denywinarto. Hope you find some help here and take the opportunity to help others!

I quit doing Batch files a while back an went to vbs because it seems more robust. That said there is a vbs script in this thread (post #3) that you point at a directory and it makes a text file of file information including modified date and the full path to the file.

If you run this against your two folders (producing the two text file) then write a process that compares the two files and moves data according to your desires. You can do the file move and compare in vbs and not have to worry about the goodysnc piece.
 

Read other 1 answers
RELEVANCY SCORE 85.2

hi everyone...

i wrote a batch file to move several different file types from one folder to multiple folders...

when i run it, i get access denied on some of the files to be moved, but only the files that are trying to overwrite existing files.

i use the /-y option and when i get the prompt to overwrite, i type a for all or y for yes and i get an access denied error....

any ideas?

thanks..
 

A:Using The Move Command In A Batch File...

Read other 6 answers
RELEVANCY SCORE 85.2

Hey All, I have a list of files that I need to move (cut and paste) from location to another location.

Thanks in advance

A:Mass Move Batch file

Hi, can you describe a bit more about what you need?

By the sounds of what you've said, you have a text file containing a list of files to move?

Read other 5 answers
RELEVANCY SCORE 84.8

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:

video1.mp4
video2.mp4
video3.mp4

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
RELEVANCY SCORE 84.4

Hi,

I need help creating a script to run on a Windows server that finds a folder of a specific name inside of a sub folder and moves only that folder and all files inside it out of that folder to the first sub folder of the folder its in and renames it to a specific name.

So as an example I have folders:

\0001\Folder1\Folder2\
\Folder3\

\0002\Folder1\Folder2\
\Folder3\

and so on and so on for thousands of numbered folders.

Folder2 always has the same, pretty sure Folder1 is always the same name, the numbered folders have various numbers. The new folder name will always be Folder4.

End result:

\0001\Folder1\Folder2\
\Folder4\

\0002\Folder1\Folder2\
\Folder4\
 

A:Batch file to find and move directories

Read other 16 answers
RELEVANCY SCORE 84.4

I have a DOS batch file that moves files from one directory and sorts them into separate folders alphabetically. The problem is existing files get replaced. I know I can add the -y switch to be prompted but there's too many prompts. Does anyone know how I can skip if file exists automatically? I don't see that option anywhere in dos move command. Was wondering if I can use the "IF" variable somehow. Like IF exists skip or no replace etc. Can't find answer anywhere on web. TIA any help. Here is an excerpt from my batch file:

move a*.* D:\!TLF\a
move b*.* D:\!TLF\b
move c*.* D:\!TLF\c
move d*.* D:\!TLF\d
move e*.* D:\!TLF\e
move f*.* D:\!TLF\f
move g*.* D:\!TLF\g

Read other answers
RELEVANCY SCORE 84.4

Basically I'm creating a Team Fortress 2 batch file that I can use as an admin to view demos in wireframe mode to detect wallhackers,

what i want to be able to do is set up a option where a user can type a file name in, which is then used after they hit enter,

for instance,

I choose the start a team fortress demo in wireframe mode,

I am then given the option to type the demos files name,

This file name is then used in the launch option of team fortress 2 and loads up,

I have included my batch file in a .txt format for you too see what I mean, (the bits I require help on is the bits in < >)

Sorry if this is confusing, I'm just a beginner at creating batch files
 

A:Solved: Batch File - Changing code based on user imput

Read other 7 answers
RELEVANCY SCORE 84

Hi Windows Expert,

May i know how to write a batch file that will copy a folder from local computer to a network shared folder and it will overwrite the existing folder in the network shared folder everyday?

Thanks.

Regards,

Read other answers
RELEVANCY SCORE 84

Hi, i have a desktop computer and a laptop, my computer is on domain and laptop is not on domain,
now i need to access a folder on my desktop computer from my laptop , so if anyone would like to work in that folder they can click and open only that folder, for that i would like to create a batch file and i never did it, so please help me to create one, i will really appreciate it.
 

Read other answers
RELEVANCY SCORE 84

I want to know more about creating a batch file. From which websites i can read about the batch file creating.

if possible give me a link.
 

A:how to create a batch file

Rob's Website is one of my favorites for reference.
http://www.robvanderwoude.com/
 

Read other 1 answers
RELEVANCY SCORE 84

I am wondering how to write a script that would delete all files of a certain extension from a folder.
 

A:Solved: Batch file to delete all .xxx files from a file

Read other 6 answers
RELEVANCY SCORE 83.6

Hi all,

I need to write 1 batch script to move the files from FTP location to my remote server location. seems both are in same network.

but when i give ftp command from remote server where i need to get files, it connected to the FTP server and shows all the files of ftp server while doing DIR.

pls help me to write the script as i m new to batch script. i need to call this script thro informatica command task. so that i can use those file to load my warehouse.

Its an urgent issue.
thanks in advance

Read other answers
RELEVANCY SCORE 83.6

Hope I can explain my difficulty.
I have duplicated folders album name for all my music files.
As there is quite a considerable number I wondered if it was possible to batch file (automate) the process.

I can not delete "d" as this would delete all the tracks.
What I need to do is move the tracks at "e" into folder "c" and delete the then empty folder "d"
Folder structure is thus:

(a) Music Collection
(b) /Artist Name
(c) /Artist Name/Album Name
/Artist Name/Album Name/Album Name
(e) /Artist Name/Album Name/Album Name/The Tracks

What I am trying to end up with is:
/Artist Name
/Album Name
/The Track files

Is this possible or has anyone any suggestions.
Thanks for looking

A:Batch file to move (many) duplicted folder contents - Help!!

You can try this;

DropIt: Sort Your Files With A Drop!

<http://dropit.sourceforge.net/>

You can set up rules so that the software sorts your files as you want them.

There are lots of utilities for checking duplicates;

AllDup, from this site, is a good one;

AllSync Backup Software: windows backup, backup and restore, backup program, sync program, pc backup software, backup utility, backup solution, computer backup, sync folders, automatic backup, file synchronization

<http://www.allsync.biz/en_index.htm>

All these things have to be used with due care.

Regards....Mike Connor

Read other 3 answers
RELEVANCY SCORE 83.6

Win7 stores desktop icons in two different folders:
C:\Users\Public\Public Desktop
C:\Users\UserName\Desktop

This results in two groups of sorted icons on the desktop. I want to move all of the icons in the "C:\Users\Public\Public Desktop" to the "C:\Users\UserName\Desktop". This will result in ALL of the desktop icons being sorted.

I want to use a batch file to do the move. Then click on a desktop icon to run the batchfile. How can I do this?

----------

The batch file I've come up with is named "movicons.bat" as follows:
rem @echo off
move "C:\Users\Public\Public Desktop\*.*" C:\Users\Dad\Desktop

I created a desktop shortcut named "MovIcons" with the target as:
D:\Batfiles\movicons.bat

But when I click that desktop icon, the icons are not moved. Need help to get it all working.

Thanks,
Skyzoomer

A:Batch file to move desktop icons so ALL are sorted.

I'm not quite sure what your goal is here.

Do you have duplicate icons on C:\Users\Dad\Desktop?

Read other 9 answers
RELEVANCY SCORE 83.2

I generally run windows aero theme across all four monitors which i am happy with. However when i run a music app called cubase 5, i hear all sorts of squeaks and glitches when i simply move my cursor around the screen. The problem resolves itself when i switch to the standard windows classic theme.


My question is:

How do i write a simple windows batch file that when run by doubleclicking an icon will:

1) switch the theme to windows classic
2) run cubase.exe
3) switch back to windows aero theme when i exit cubase.


I appreciate you considering my query.

All the best.

Andy

A:Is it possible to create a windows batch file to do this?

Something like this should do
Code:
"%windir%\Resources\Ease of Access Themes\classic.theme"
"C:\location\cubase.exe"
tasklist | find "cubase.exe"
if errorlevel 1 "%windir%\Resources\Themes\aero.theme"
pause
Please change cubase filename and location for appropriate ones - I do not have that program.
Delete "pause" if you want cmd window to close upon completion too.

Personalization window will pop up, but that is a regular thing: it always pops up if you start theme file in any way.

Read other 4 answers
RELEVANCY SCORE 83.2

I want to make a batch file to run sfc /scannow & then restart the computer.
I use XP Home SP2.

I made one with sfc /scannow & shutdown -r but it restarts after sfc /scannow is just starting to run.

I need sfc /scannow to finish & then for the restart command to kick in.
The purpose is to let sfc /scannow to run & the computer to restart & run Error Checking & a boot time Avast scan.

I can set up the Avast & Error checking seperate from the .bat file.
They will run when the computer restarts.
Any help will be appreciated.
Thank you.

A:How To Create A Batch File With 2 Commands

Here is a web site - Making Batch Fileshttp://www.tnd.com/camosun/elex130/dosbatchtutor1.htmlHSould help with your problem.cya l8rThorXP

Read other 10 answers
RELEVANCY SCORE 83.2

Just wondering if anyone could help me create this batch file. Have been trying for a while and is starting to really frustrate me. Any help would be greatly appreciated! Thanks.

? Create a batch file called myBackup.bat.
? It will backup all contents of a folder called 'files' to a folder called 'filesBackup'.
? If 'filesBackup' doesn't exist, it should create it.
? If 'filesBackup' is empty it should copy all files including subdirectories.
? If 'filesBackup' is not empty it should copy only newer files, without prompting.
? Don't use absolute paths, only relative folder names.
? You will need to use command line help to find the best command to use and what parameters to use. Copy command won't work, you will need a command that does eXtra.
? Paste the text of the batch file as well as a screen shot into your document.

A:Create Backup batch file, please help!!

Is this for a school assignment?

Why do you want to use relative directory? Why not use env variables?

Read other 2 answers
RELEVANCY SCORE 83.2
RELEVANCY SCORE 83.2

Hi, I need to create a batch file or even VB script that will put ~15 text files into separate strings (each text file contains 1 line of text) and then will compare these 15 strings and group them on based on identical strings. Is there any way this is possible? This is what I have got so far...I'm not sure if I am on the right track.
Code:
@Echo Off
SetLocal EnableDelayedExpansion
Set n=
Set InputFile=File1.txt
For /F "tokens=*" %%I IN (%InputFile%) DO (
Set /a n+=1
Set v!n!=%%I
)
EndLocal

 

A:Create Batch For File Comparison

Read other 6 answers
RELEVANCY SCORE 83.2

Hope this is the correct sub forum for this..

Often use a variety of command line functions e.g. winver / netplwiz etc etc

Is there a way of creating a batchfile to include multiple commands with a number option to select...would be so handy

i.e. 1 Netplwiz
2 Winver
3 ???
Thanks

Read other answers
RELEVANCY SCORE 83.2

I want to copy files from a folder to another folder named with system date. Actually, I want to such a batch file which gets executed when I click a button on desktop and complete the above task. Also, once created can I edit it, because opening .bat file tells that it is not a valid win32 file.

Read other answers
RELEVANCY SCORE 82.4

I have a list of 1000 files names that I put in a text file named list.txt. Need to find them in more folders, sub folders which has 12000+ files in it. The below script works fine but I would like the Admin Right to be removed and also I want the files to be moved permanently into C:\your_files. Is there any one who could help me in this? Thank you in advance.

@echo off
REM (c) 2013 BY NEUTRON16 (http://www.sevenforums.com/member.php?u=3585)
CLS
TITLE Mass file finder by Neutron16
REM finds files in list.txt file and copies them to C:\your_files
REM CHECK FOR ADMIN RIGHTS
COPY /b/y NUL %WINDIR%\06CF2EB6-94E6-4a60-91D8-AB945AE8CF38 >NUL 2>&1
IF ERRORLEVEL 1 GOTO:NONADMIN
DEL %WINDIR%\06CF2EB6-94E6-4a60-91D8-AB945AE8CF38 >NUL 2>&1
:ADMIN
REM GOT ADMIN RIGHTS
COLOR 1F
ECHO Hi, %USERNAME%!
ECHO Please wait...
FOR /R "%~dp0" %%I IN (.) DO for /f "usebackq delims=" %%a in ("%~dp0list.txt") do echo d |xcopy "%%I\%%a" "C:\your_files" /e /i
COLOR 2F
ECHO.
ECHO (c) 2013 by Neutron16 (http://www.sevenforums.com/member.php?u=3585)
PAUSE
GOTO:EOF
:NONADMIN
REM NO ADMIN RIGHTS
COLOR 4F
ECHO.
ECHO PLEASE RUN AS ADMINISTRATOR
ECHO.
pause
GOTO:EOF

Read other answers
RELEVANCY SCORE 82.4

What I want to do is a batch file or program so that when you open it, it mimics key presses Alt+Tab. Or at least tell me where's the Flip2D program location

I need it because I want my Synaptics touchpad to open it (this program) when a I press the upper left corner.

Thanks!

A:Create a batch file that mimics Alt+Tab key presses

Hello Mathius,

Here's an exe file I whipped up that acts a Flip2D shortcut that may work for you for this.

Flip 2D Shortcut Program

Hope this helps,
Shawn

Read other 1 answers
RELEVANCY SCORE 82.4

Hi,
Can anyone tell me how to create a batch file to run xcopy?
I want to copy d:files to y:backups.
Then I want to copy that to another PC on a network. If I just drag and drop, the copy fails every time because of errors in the files. This is a networked directory with many disfferent users!
I want to use this for backing up. I need to copy all files and subdirectories.
I think the command will be something like:
xcopy c:files y:backups /c /s /d
but I only got this by reading the Help section!
Thanks in advance!
Steve
 

A:[Solved] How to create a batch file to run xcopy?

Read other 15 answers
RELEVANCY SCORE 82.4

Hi there, In XP I used 2 batch files to create a popup reminder in a cmd window. I don't want to use a program like task manager as it requires to much input for the type of reminder I want. With these batch files I would run one of them, enter a time, enter a description and that was it. A cmd window would popup at the set time and show me whatever I had typed in the description. Quick and easy, no mucking around. I have tried to use them on W7 but they don't seem to work. Can someone please tell me if I can do this on W7 and how? Here are the details of the 2 batch files used in XP:

They both go in C:\Windows. Run setalarm.bat to create the reminder. Type time in 00:00 format and press Enter. Type description and press Enter.

1: setalarm.bat

@ECHO OFF
SETLOCAL
SET _t=%1
SET _d=%2 %3 %4 %5
SET _x=%_d: =%
IF NOT DEFINED _t (SET /P _t=Enter the time: )
IF NOT DEFINED _x (SET /p _d=Enter the description: )
IF NOT DEFINED _d (SET /p _d=Enter the description: )
ECHO. reminder at %_t% to %_d%
at \\%COMPUTERNAME% %_t% /interactive cmd /c showalarm "%_d%"

2: showalarm.bat

@echo off
cls
echo.
echo.
echo %1
echo.
echo.
pause

Cheers.

A:create a popup reminder using batch file

Oh woe is me. Can nobody help me with this?

Read other 9 answers
RELEVANCY SCORE 82.4

Does anyone know how I would write a batch file to pick at random one name from a list?

We want to be able to randomly choose a place to eat every Friday at work!

I have found some batch files written that are supposed to do this, but I cannot get them to work.

Thanks!
 

A:How do I create a Randomly Picking Batch File?

Why do it with a batch file? That's just masochistic.
Use Excel instead.. Any scientific calculator will do too. Even dice would be easier.
 

Read other 4 answers
RELEVANCY SCORE 82.4

I need to copy several files from desktop to mapped network drive so here is simple bat file i wrote

copy %USERPROFILE%\Desktop\1.bd W:\backup\1.db

but it doesn't work... syntax error any help?



EDIT: ok error myself... it should be copy "%USERPROFILE%\Desktop\1.bd" W:\backup\1.db

Read other answers