Tech Problem Aggregator

using a batch file i would like to copy the newest file to a new location.

Q: using a batch file i would like to copy the newest file to a new location.

Hi,
I am new to batch files and have read up a little on xcopy and robocopy.
We currently have a folder which new builds are copied and compressed to .zip files and stuck in a folder. Dozens of zip files are created every day
What I want to do is the following:

I want to copy the newest zip file from folder 1 to folder 2 and extract it.

What is the simplest way to find and copy the newest zip file considering multiple zip files are created each day?

A: using a batch file i would like to copy the newest file to a new location.

Try this:
@echo off
for /F "delims=" %%a in ('dir /b /od "d:\My Files\*.zip"') do set Youngest=%%a
xcopy /y "d:\My Files\%Youngest%" "Folder2\"

3 more replies
Answer Match 78.9%

I'm trying to write a .bat that's supposed to handle the very simple task of copying a file to the desktop.

Something like:

copy x:\folder\file.ext [desktop]\file_backup.ext

The problem: [desktop].

It would be really easy if I could simply insert %desktop% the same way as %windir% etc. Unfortunately, %desktop% doesn't exist.

Using the variable for userprofile doesn't work either, because the user may have moved the desktop folder out of the docs & sets folder to any other location, and not necessarily on the same partition or drive.

It would be easy in a .vbs, but that won't work if the windows script host is locked down or disabled.

So it has to be a batch file. Does anyone know how to explain a .bat how to find the desktop?
 

A:Batch file: how to insert desktop location into copy command

16 more replies
Answer Match 103.32%

Hi,
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?

More replies
Answer Match 98.28%

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.

Thanks

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.


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

1 more replies
Answer Match 95.34%

Hello,

I want to have some redundancy for our backup. At the moment our Windows Server 2003 system is being backupped by NT backup, it stores the backup on a different computer (through a UNC pad).

The system the backup is being stored on, is a Windows XP Pro (SP3) Machine.

Problem is I want to copy the newest BKF file to a external harddisk on a daily basis. I have found a script for this:
Code:
@echo off
setLocal EnableDelayedExpansion

pushd "E:\TGI-Backup\Backup Files"

for /f "tokens=* delims= " %%a in ('dir/b/od') do (
set newest=%%a
)
copy !newest! J:\Test
tested the script with a startfolder C:\Start and a Finish folder of C:\Finish and put several txt files in there. When I run this script the newest txt file was copied from c:\start to c:\finish.

Problem is the line: "E:\TGI-Backup\Backup Files" is not recognized. This has to do with the Space in the folder "Backup Files". Adding or removing the " characters around a pad does not work as well.

The server is configured to store the backup in \\JESUS\TGI-Backup (local foldername E:\TGI-Backup). But is automaticly adds the folder "Backup Files" and stores the BKF files in there
-Is there any way to get the pushd command to recognize folder/file names with spaces?

or

-can I let NT backup store the backup in a folder without the subfolder "Backup Files"?

Tnx in advance,
Wouter
 

More replies
Answer Match 94.92%

Hi Guys,

I want to make one batch file which daily copies yesterday's files from one folder & paste it to another folder.

I.e.
C:/111 folder has following files.
1.zip had yesterday's date
2.zip had yesterday's date
3.zip had last sunday's date

now, when i will run batch file today, it only copies 1.zip & 2.zip & move to another folder C:/222

So C:/222 contains following
1.zip had yesterday's date
2.zip had yesterday's date


Please note , i have to run this batch file daily which should not require any changes.

More replies
Answer Match 94.92%

Hi all,

Please help!! I'm having a problem to copy some files from a folder.
My folder have lots of files and is there any way for me to write a batch file to copy only files according to "date modified"? For example last week files or yesterday files.

Please help!! Urgent!!!
Thank you.
 

A:Urgent!! Copy file by date modified using Batch File.

Take a look at XXCOPY: http://www.xxcopy.com/index.htm
 

2 more replies
Answer Match 91.98%

Help me make a batch file that copies a file from one computer to another computer in a network...

PC1 = Source
PC2 = Destination

I want to copy a file from PC1's Drive E: to PC2's Drive E:

A:How to copy a file from 1 pc to another pc in network using batch file

Yes I want to copy files from PC1 to PC2 over the network...

PC1's Drive E:\Online Games\Battle of Immortals\Battle of the Immortals
to
PC2's Drive E:\Online Games\Battle of Immortals\Battle of the Immortals

9 more replies
Answer Match 90.3%

Hello we are running Windows 7 Enterprise x32
When you click on the Start Button Win7 has the Projector mode toggle.

They want it to Automatically Clone with no choice needed by our "lazy" users.

Now the word is Duplicate on the toggle bar so I am not sure which word to use. NOR am I sure where to place this file for it to run at start up for all users.

@ECHO OFF
c:\\Windows\System32\DisplaySwitch.exe /duplicate
cls

A:Need Help- Quick Batch File / Location

Hello Jewel, and welcome to Seven Forums.

You could create a shortcut using the tutorial below with the target location below to have it switch to "Duplicate" when used.

C:\Windows\System32\DisplaySwitch.exe /clone

Display Switch Shortcut - Create

Once the shortcut is created, you could save it where you like (ex: in a C:\Users\Public folder), then use the tutorial below to create a task to run this shortcut from this location at startup for all users.

Task - Create to Run a Program at Startup and Log On

Hope this helps,
Shawn

9 more replies
Answer Match 89.04%

hello everyone,
i have batch file that compress all the folders where it located and create self extract file (exe)
the command that execute is
Code:
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a -sfx "%%X.exe" "%%X\"
i'm trying to simplify the process for some teacher to run batch file from mapped drive (like H) and the batch file do that -
Code:
xcopy h:\class d:\class /s /y
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a -sfx "%%X.exe" "%%X\"
xcopy d:\class\*.exe q:\students /y
the problem is when it reach to process the compression action it compress the folders on H drive and not on D drive
how can i target the compression to D drive instead of H drive
any halp wold be appreciated

A:batch file to run local from remote location

You could specify a destination path? e.g:


Code:
set dest_path="d:\class"
xcopy h:\class %dest_path% /s /y
for /d %%X in (%dest_path%\*) do (
"c:\Program Files\7-Zip\7z.exe" a -sfx "%%X.exe" "%%X\"
)
xcopy %dest_path%\*.exe q:\students /y
Or if the path is going to change regularly, you could create a dialogue asking the user to select where they'd like the files copied to as well

3 more replies
Answer Match 89.04%

hello there.

i have made a simple batch file which will be on a software installation CD. So far, i have gotten to grips with using xcopy, but there are a couple of more advanced things i want to do, and i cant find out how to do them. Any good links? all the batch file does is copy certain files from the disk to the PC's hard drive. at the moment, it will only copy to C:/Program Files/Blah/Blah, but i would like it to prompt the user and ask:

"is your installation in C:/Program Files/Blah/Blah?

Yes/No"

If you say no, i want it to ask:

"Please enter the correct path"

so you enter

*:/*/*/*

and press enter and it does it. I would also like it to ask for confirmation, like

"this will copy and overwrite files to *:/*/*/* do you want to continue?

Yes/No"

may be a bit of a tall order for my first post! a push in the right direction would be helpful...

Thanks
 

A:Batch file commands - choose location

Welcome to TSG!

Using Set /P to prompt the user and get a response, then using an If statement to test the response would work. Same process for entering a path. You can then check if it exists, and if not, have them confirm they want to create it.

The Command Prompt itself is a good source of info. Type help to get a list of commands. Type the command followed by /? for more info.

Goto Start | Help and Support, and search for Command Line Reference.

DOS and VB Scripting Links:
Command-line reference A-Z
Using batch parameters
Windows 95/98/ME Batch file Tutorial (Still a good basic reference for WinNT/2K/XP)
Batch File Functions for NT4/2000/XP/2003
Rob van der Woude's Scripting Pages
Microsoft Script Center
Beginners Guides: WindowsXP Command Prompt
Beginners Guides: Understanding and Creating Batch Files

HTH

Jerry
 

1 more replies
Answer Match 88.2%

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.

3 more replies
Answer Match 86.52%

I am trying to copy files from a source directory to an output directory when the output directory already has a file with the following:
../reusable_components/<filename>#.

I already have the following:
findstr /s /i /m "\<../reusable_components\>" *.xml > results.txt
This will return a list of filenames with the text in it.

Now I want to parse the list of files and take out the filename after ../reusable_components. I tried:
for /f %%a in ('findstr /s /i /m "\<../reusable_components\>" *.xml') do (echo %%a)
but that didn't work any ideas?

More replies
Answer Match 86.52%

Does anyone have a simple batch already made to copy? I need to copy everything from my Y:\ drive to my G:\drive. I need it to overwrite original files.. please.. if anyone has it... thanks.
 

A:Copy Batch file

This may work:

xcopy y:\*.* g:\ /a /e /k

Reference:
http://www.computerhope.com/xcopyhlp.htm
 

2 more replies
Answer Match 86.1%

Hello all , i am new to batch programming.

I wish to have a batch file to read .apk file from folder and then copy it to another folder. Then it should rename the copied apk file to test.apk

eg:
i have a file in folder e:\apps\angrybirds.apk , I want to copy this angrybirds.apk to d:\apps and rename it to test.apk

Here the file names in the e:\apps\ will be changing. So what ever may be the name , it should read the name of the file from e:\apps\ folder , copy it to d:\apps\ and rename it to "test.apk" . Test.apk is a fixed rename
 

A:Solved: Batch file to copy a file from folder and rename it in another folder

12 more replies
Answer Match 85.68%

What is the command to copy a file from a ThinApp location?
example:
copy "C:\Documents and Settings\all users\Start Menu\PortableApp\Thinstall\Application\%StartMenu%\PortableApps\Register.mny" "Y:\PortableApps\file"
This example does not work, I guess it is because of \%StartMenu%\. Any suggestions

Thanks,

jjblack
 

A:batch file copy command

8 more replies
Answer Match 85.68%

Fellow Forum Members,
I have two external hard drives I'm calling Hard Drive A and Hard Drive B. Hard Drive A & B are mounted to external USB cradles. Both USB cradles are connected to the same PC containing Hard Drive C. My objective is to transfer all data files, folders, sub folders from both Hard Drive A & B over to two different hard drives on Hard Drive C.

I need help figuring out Windows 7 so I can accomplish the task above. I have heard of RoboCopy but don't know how to write the script. Does an application such as XYExplorer perform the task of batch copying from multiple external hard drives over to two different folders in an internal hard drive?

How would a RobyCopy Script look like that does the following:

Copy G:\hdA_data1 over to C:\data1_from_hdA
Copy H:\hdB_data2 over to C:\data2_from_hdB
Automatically Turn off computer after copy operation is done


Any info will be greatly appreciated. Thanks in advance.

A:Windows7 Batch File Copy Possible?

Hi,

I haven't had much luck with working out how to turn the computer off automatically, although it can be done.

For the copy process, just usex copy, robocopy gives no benefit since this is a one time? copy of files.


Code:
xcopy G:\*.* /E C:\DataG
xcopy H:\*.* /E C:\DataH
From the cmd prompt:

Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Colin>xcopy /?
Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
[/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B]
[/EXCLUDE:file1[+file2][+file3]...]

source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies only files with the archive attribute set,
doesn't change the attribute.
/M Copies only files with the archive attribute set,
turns off the archive attribute.
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]...
Specifies a list of files containing strings. Each string
should be in a separate line in the files. When any of the
strings ... Read more

2 more replies
Answer Match 85.68%

I know there are solutions for this on this forum but I can't get any of them to work in my specific situation.

I have a program that cannot deal with ZIP files and I need to manually sort them out. What I can do is export a partial location for these ZIP files to a txt files so I have:

filelist.txt:
folder\file.zip
folder\file2.zip
...
filder\fileN.zip

What I want to be able to do is create a batch file that will read the location of these files and copy them to a folder. The files are located on a network share but they r are mapped in My Computer. I can modify to the txt file so it gives the full path as a UNC path or a hard path.

I've been trying to get it to work using a For In Do statement but I don't know if that's the best solution. Help would be greatly appreciated. Thanks.

Dilo.
 

A:Batch file to copy files

If you need to replicate the folder structure you need to use xcopy or robocopy.
Posted via Mobile Device
 

2 more replies
Answer Match 85.68%

How do I copy/xcopy a file to the desktop using a batch file? That is, what is the destination to use?Thanks a bunch, Uncle Dewey

A:How do I copy to desktop using a batch file?

%UserProfile%\DesktopOr C:\Users\Public\DesktopOr C:\Users\(username)\DesktopFor Vista

5 more replies
Answer Match 85.68%

hello every onei am just started to learn about batch files, and done some really basic ones So i was just trying out the copy command just to try one for myself, but seem to be getting stuck"EXAMPLE" I WAS TRYING TO COPY C:\TEMP TO C:\Documents and Settings\ROWLEY.PRIVATE-3264A01\My Documents I also tryed copy c:\temp to c:\my documents. but as i am new to this i am doing something wrong can anyone shed any light on this for me. i am using windows xp. Copies one or more files to another location.COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination] [/A | /B]] [/V] [/Y | /-Y]source Specifies the file or files to be copied. /A Indicates an ASCII text file. /B Indicates a binary file. destination Specifies the directory and/or filename for the new file(s). /V Verifies that new files are written correctly. /Y Suppresses prompting to confirm you want to overwrite an existing destination file. /-Y Causes prompting to confirm you want to overwrite an existing destination file. The switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line.To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format).Examplescopy *.* a:Copy all files in the current directory to the floppy disk drive.copy autoexec.bat c:\windowsCopy the autoexec.bat, usually found at root, and copy it into the windows director... Read more

A:Batch File Copy Command

The copy command works on files, not on directories. So, for example, if you wanted to copy all the files in the Temp directory (NOT A GOOD IDEA, BTW - it'll copy a whole bunch of nonsense stuff) to your My Documents folder the syntax would be:

COPY C:\TEMP\*.* TO C:\Documents and Settings\ROWLEY.PRIVATE-3264A01\My Documents\*.*

This will copy everything in the C:\Temp directory to the My Documents directory that's indicated here. The use of the wildcards of *.* means that it will copy everything with entries before the . and everything after the .

It'd be a better experiment (IMO) to just copy 1 text file from the Temp directory to the My Documents directory. In this case it'd be:

COPY C:\TEMP\filename.txt TO C:\Documents and Settings\ROWLEY.PRIVATE-3264A01\My Documents\*.*

You'll end up with a document named filename.txt (if it exists in your Temp directory) in your My Documents folder.

Just for experimentation, try typing "dir *." (without the quotes) at the command prompt. It'll give you a listing of the directories that are located within the folder that your command prompt is open to.

2 more replies
Answer Match 85.68%

Is there a simple way to copy an entire folder and its subfolders to another location using a batch file?

Thanks,
Harold
 

A:Batch file to copy subfolders?

8 more replies
Answer Match 85.26%

I have searched all over the web and can't come up with a definitive answer.

Are shadow copies, by default, stored in the "System Volume Information" folder. If not, where are they located? Also, are the files in the "System Volume Information" folder both restore point and shadow copies rolled into the same files?

Thanks

A:Shadow copy file location

Hi BOBO1865 and welcome to Vista Forums

You should find some information at the following link: The Storage Team at Microsoft - File Cabinet Blog

2 more replies
Answer Match 84.42%

I'm trying to create a batch file that will copy from a source and paste into a destination. I need it to add the date and time to the file name as well.

So far, I have it successfully adding the date with the following code:

ren <file> <file>%date:~4,2%-%date:~7,2%-date:~10%.doc

This works....but I cannot seem to add the time as well.
Any help?

 

A:Simple Copy and Paste Batch File

See if this thread helps?

Or, just copy the files and use a utility like Rename to do the file name changes after the fact.
 

1 more replies
Answer Match 84.42%

Hi
I am currently running the following to supposedely create a directory IE V:\Backup Folder\Pictures\Backup 21-05-2012
robocopy /e "c:\users\jon\pictures" "v:\Backup Folder\Pictures\Backup %date:~-10,2%-%date:~-7,2%-%date:~-4,4%"

Evrything works fine except the backed up pictures folder is just named as V:\Backup Folder\Pictures\My Pictures

If for arguments sake I backup my outlook file using the above parameters I get what I want EG
V:\Backup Folder\Outlook\Backup 21-05-2012

It's as though there is something within the pictures folder? that is preventing the corrctly named folder from beign created?
The same happens when I try and backup Desktop and Documents folders
What am I missing?

A:Creating Batch File with Robo Copy

  
Quote: Originally Posted by Big Tung


Evrything works fine except the backed up pictures folder is just named as V:\Backup Folder\Pictures\My Pictures


Hi,

I can't quite understand where the \My Pictures is coming from. Do you mind posting a screen capture image of the folder arrangement, so I can see what it looks like?

regards,
Golden

3 more replies
Answer Match 84.42%

I have a folder on a network drive that I would like to copy to another location on another network drive. The source folder should copy over the destination folder, part of the path to the destination folder to be copied over changes based on the person who signs into the PC; OS is XP. This is what I thought would work but hasn?t. Any help would be much appreciated.

XCOPY ?\\Server Name\ Folder1\Folder to be copied? ?\\Server Name\%userprofile%\Folder\my documents\Same Folder Name As in The source folder to be copied over" /E /C /R /I /K /Y

A:Copy Folder batch File Issue

XCOPY ?\\Server Name\Folder1\SourceFolder? ?\\Server Name\%username%\Folder\my documents\DestinationFolder" /E /C /R /I /K /Y

Hope this helps

1 more replies
Answer Match 84.42%

Below is a batch file I created to copy all the files from a program called A5V5. This batch file works to copy the files to two different drives What I want to do is if the J: Directory is not availble (This is a flash drive) that it will copy to the E:\ directory which is a second HDD and not leave a "The system cannot find the drive specified" when the flash drive is not inserted.

@echo off
cd c:\
cd program files (x86)
cd A5V5
cd Ranch Mobile, Inc
Copy *.* "E:\Ranch Mobile" (This is a second hard drive for backup files only)
Copy *.* "J:\Ranch Mobile" (This is a Flash drive that is not always inserted)
Pause

Thanks for any help. I like the way batch files work and I can do these simple ones but when it comes to doing the more complicated ones I am at a total loss.

A:How to make a multible copy batch file

Hi AGB,

Welcome to Seven Forums.

Can you try the following and see if this works:

Code:
@echo off
cd "c:\program files (x86)\A5V5\Ranch Mobile, Inc"

Copy *.* "E:\Ranch Mobile"

IF EXIST J:\ (goto jdrive) ELSE (goto end)

:jdrive
Copy *.* "J:\Ranch Mobile"

:end
Pause
This will always copy to your fixed E:\ drive and will only copy to your J:\ drive when exists.
Is this what you wanted?

Regards,
JDobbsy1987

3 more replies
Answer Match 84.42%

Hi all,

To increase our backup solutions, we have decided to backup our SQL database every hour to a folder within the C drive (we couldn't get it to backup straight to a USB drive). So now we need a way (batch file best solution?) to copy these files to the USB drive, lets say every 1.05hours just after they've been created?

Maybe we could copy the entire folder every hour and delete old backups that are in this folder and to the new place for the backups. (although I guess it won't work as it'll have the same folder name once it has been copied).

Or copy the individual files to that new folder although with this they have all different names so is it possible to copy the newest file to the new folder and then after this delete the old backups from a certain time frame?

Big thanks for your help!

A:Batch file to copy files from C drive to USB

Code:
REM Creates a Backup of files every hour
@echo off
:start
XCOPY <source path> <destination path> /w /f /-y
TIMEOUT /t 3600 /nobreak
goto start
This might work, I'm no expert by any means, but the batch file should copy all the files, and then pause for a hour, and then loop back to the start and complete the same process again.

Here's what the XCOPY switches mean - http://www.microsoft.com/resources/d....mspx?mfr=true

9 more replies
Answer Match 84.42%

Lately I've noticed a lot of new Windows users don't really know how powerful command line tools Windows 7 includes.

Here's one, making batch file copy easy and almost automated: Robocopy. To use it, just open the command prompt and type robocopy /? to get all the options. Here's the summary in case you are interested:

-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------

Usage :: ROBOCOPY source destination [file [file]...] [options]

source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir (drive:\path or \\server\share\path).
file :: File(s) to copy (names/wildcards: default is "*.*").

::
:: Copy options :
::
/S :: copy Subdirectories, but not empty ones.
/E :: copy subdirectories, including Empty ones.
/LEV:n :: only copy the top n LEVels of the source directory tree.

/Z :: copy files in restartable mode.
/B :: copy files in Backup mode.
/ZB :: use restartable mode; if access denied use Backup mode.
/EFSRAW :: copy all encrypted files in EFS RAW mode.

/COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT).
(copyflags : D=Data, A=Attribut... Read more

A:Batch file copy made easy

I've been using robocopy for years. It does pretty much all of my backups at home and my laptop backup at work. Most things backup to an external hard drive (or a couple as I like to keep one offsite)

C:\Windows\system32\robocopy C:\users\user1\Documents E:\Backups\PC-name\Documents /MIR /E

That commands mirrors up the source and destination and gets empty folders thus preserving the directory structure.

Robocopy only copies files that have changed...thus subsequent copies are extremely fast.

I highly recommend it.

3 more replies
Answer Match 84.42%

Hello Everyone its me again, I need help on this new file I was making to Add and Delete Mods for Garrys Mod by the few clicks of some buttons.
But I've ran into a problem.

(Im not going to give the whole code because its way to long I'll give shortened version of it.)

Heres what I had before:

IF Not exist "C:\Program Files\Steam\steamapps\psycozl\garrysmod\garrysmod\lua\effects\stridcan_charge\init.lua" copy "C:\Users\~\Desktop\Ultimate Gmod Folder\Mods\shoop_da_whoop\Shoop da Whoop\lua\effects\stridcan_charge\init.lua" "C:\Program Files\Steam\steamapps\psycozl\garrysmod\garrysmod\lua\effects\stridcan_charge\"
IF Not exist "C:\Program Files\Steam\steamapps\psycozl\garrysmod\garrysmod\lua\effects\stridcan_expld\init.lua" copy "C:\Users\~\Desktop\Ultimate Gmod Folder\Mods\shoop_da_whoop\Shoop da Whoop\lua\effects\stridcan_expld\init.lua" "C:\Program Files\Steam\steamapps\psycozl\garrysmod\garrysmod\lua\effects\stridcan_expld\"
IF Not exist "C:\Program Files\Steam\steamapps\psycozl\garrysmod\garrysmod\lua\effects\stridcan_fire\init.lua" copy "C:\Users\~\Desktop\Ultimate Gmod Folder\Mods\shoop_da_whoop\Shoop da Whoop\lua\effects\stridcan_fire\init.lua" "C:\Program Files\Steam\steamapps\psycozl\garrysmod\garrysmod\lua\effects\stridcan_fire\"
IF Not exist "C:\Program Files\Steam\steamapps\psycozl\garrysmod\garrysmod\lua\effects\stridcan_mzzlflash\init.lua" copy... Read more

A:Solved: Gmod Batch File Copy Help???

11 more replies
Answer Match 84.42%

So i have a file, a .cab extension, i can open it via winrar and saw the properties of that file, also i can delete it to recycle bin, but i cant copy that file to another location in same hdd or to my external hdd. Already run chkdsk and 0 bad sector in my ext hdd and the hdd that contain that file.Oh, and my pc was freeze when copying that file.

Any help would be appreciate

A:Can delete or open file, but cant copy it to any location

How big is the file? Maybe sending it to yourself as an attachment to an E-Mail then save it where you wish?

5 more replies
Answer Match 83.58%

Hi all,

I need a batch file (code) to copy files from last month and zip it for archive. Can somebody help me please?

Thanks!
Samsunlu
 

A:batch file to copy files from last month to archive it.

8 more replies
Answer Match 83.58%

I have a usb that I copy files from to new computers. I do this all day and would like to make it quicker.
I will have an XP path and a Vista/7 path, but just worried about XP right now.
The problem is I don't know what drive letter the USB will be in. I thought there was a %thisdrive% switch of some time.

In addition it has spaces and I don't know how to replace spaces in the path. Here is an example;

copy f:\install\105 wallpaper\*.* c:\documents and settings\All users\Shared Docuemnts\Shared Pictures\

Summary;
Determine the USB drive letter?
bridge space issue?
 

A:batch file to copy from usb- unknown drive letter

8 more replies
Answer Match 83.58%

I want to write a batch file that do this for me:

- makes a directory with the "yy.mm.dd.hh.mm" as the directory name,
- copies files and folders from a TEST directory to above destination,
- copies only new (or modified) files from the TEST directory to a separate folder.

Any Idea?

A:a simple batch file for copy files and folders

To create a directory with the date and time as the name, In a batch file use:

set DirName=%date:~-4,4%.%date:~-7,2%.%date:~0,2%.%time:~0,2%.%time:~3,2%
MD \%DirName%

Then in the same batch file use robocopy to copy files to the new directory

robocopy TEST %DirName% /e

you need to add your own paths and read the robocopy help for the right switches you need.
By default Robocopy copies only files that don't exist in the target directory but because you are creating a new directory every time it will copy every thing in TEST

You could use the /A switch which only copies files with the Archive attribute set.

3 more replies
Answer Match 83.58%

I need help with a batch file to copy the contents of my source dir to the destination dir that is to be created with that days date using xcopy or robocopy. Any help is appreciated!

A:Need a Batch File to Copy to a Custom Dest Folder

This should get you started...

for /F "tokens=1-4 delims=/- " %%A in ('date/T') do set DATE=%%A-%%B-%%C
md c:\tmp\%DATE%
xcopy c:\output c:\tmp\%DATE% /s

4 more replies
Answer Match 83.58%

I am trying to write a batch file that will copy my backup files to another drive. For example I currently have the file backed up to C:\Backup\movie backup
I want to be able to copy it to an external HDD: -
X:\Backup Folder\Movie Library, however each time I do this it overwrites the previous backup file.
I want to be able to copy this backup to a new folder each and every time, as follows: -
Today’s backup file would copy to:-
X:\Backup Folder\Movie Library\backup 03-Jul-2010 .......tomorrows would go to
X:\Backup Folder\Movie Library\backup 04-Jul-2010 etc
Can anyone help. I have been looking all day and can't find anything.

Thanx in advance

Jon
 

A:Batch File to copy to Date Stamped Folder

Welcome to TSG!

Use "X:\Backup Folder\Movie Library\backup%date%" as the destination folder name in your batch file. The %date% variable will be expanded with today's date
 

2 more replies
Answer Match 83.58%

I'm running vista on my computer and would like to be able to copy all log files containing the keyword "error" to a folder called "error logs"
thanks in advance
 

A:How to make a batch file to copy files containing a certain keyword

Welcome to the forum.

use the 'good old msdos' command find

Open command promt en type find /? this will help you see the syntax
 

1 more replies
Answer Match 83.58%

Hi,
I have a few questions about my simple batch to copy a Outlook pst file to an external drive. First, robocopy doesn't copy my file; Second, is there a way to prevent the taskeng.exe window from appearing; and Finally, I tried the command "copy" instead and it copies the file but the taskeng.exe window "hangs" and does not continue to restart outlook and therefore close on its own. By the way, the pst file is over 4Gb. Any help is appreciated, thank you!

:: Backup pst file to Server external drive
@echo off
setlocal EnableDelayedExpansion
start "" "C:\Program Files (x86)\Microsoft Office\Office12\Outlook.exe"
taskkill /im outlook.exe /f
@ping 192.168.1.1 -n 5 -w 1000>nul
@ping 192.168.1.1 -n 5 -w 1000>nul
robocopy "C:\Users.pst" "\\SERVER\Outlook Backup\user.pst"
start outlook.exe
cls
@exit
 

A:Batch to copy Outlook pst file to external drive

6 more replies
Answer Match 82.74%

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

More replies
Answer Match 82.74%

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
E:\Games\mystuff\Genesis\Vehicles\truck\diesel\4tonbaker

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

1 more replies
Answer Match 81.9%

We've got a file server here in the office on which we have a separate folder for each client. In several of these folders are a document, specific to that client, but with the same name as a similar though not identical document in another client's folder. In other words in client1's folder there may be document.doc and in client2's folder there may be a document.doc. I have need to create a collection of the 400 or so document.doc files in one place but if I were to try to simply copy them from the search result I would get a message asking me if I want to overwrite the files. Is there a way, perhaps from the command line, to copy the files from the search results to the new location and append the name of the folder from which the file is being copied to the file? In other words, client1\document.doc and client2\document.doc will be copied to newfolder\documentclient1.doc and newfolder\documentclient2.doc. Is this something for which I should use robocopy? I've got two computers, one running xp pro sp3 and the other running win 7 pro sp1. The files are on an ms small business server 2011 and will, hopefully, be copied to a file on one of the two local computers from the server. Thanks!

Ariel

A:copy files from search result and append previous location to file

You cannot copy a file with the same name to a new location without overwriting the previous version. Rename the file before copying it, If you want to keep the original file name in the original folder, then copy it and rename it before moving it. Of course if you rename the file then it will not get updated once changes are made.

3 more replies
Answer Match 81.9%

I have a spreadsheet that is used by a number of users and has a macro built into it to collect updates from several other sheets. I want to add to the macro so that once it has been updated and saved the macro then saves another version of the sheet in a seperate folder with the date and time it was saved as part of the file name.

I have tried

ChDir"H:\Resourcing Teams\Placements\Weekly activity\Archive"
ActiveWorkbook.SaveAs Filename:= _
"H:\ResourcingTeams\Placements\Weekly activity\Archive\" & Now.Day & Now.Month &Now.Year &" .xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False

But get errors

Any suggestions greatly appreciated
 

A:Solved: Excel Macro to save a copy of the file in new location with the date

9 more replies
Answer Match 81.06%

I am a complete newbie when it comes to batch files and batch file software, so apologies in advance.

I've done some research on Google etc but I seem to just be getting more and more confused trying to use various different scripts and programs and reading different info on various websites.

This is what I need...

I have a folder with around 2000 files in it. I want to be able to copy certain files from this folder (normally around 40) and place them in a brand new folder, I want to be able to do this with nothing more than a txt file that has all the file names I need copying in it with every file name on a separate line.

I receive around 10 new txt files each day so you can imagine how tedious it is searching through 2000 files, picking out the 40 I need, 10 times a day everyday.

To make things even more complicated, the txt files I receive don't always have the correct file names in them, maybe there's a misspelling or a word or two missing for some of the names. That's ok when I'm going through picking out the files I need to copy myself because I can normally tell which file is being requested, but I can't see it being so easy for a program or whatever to do, I'm guessing it'll need to have a search feature where it picks out the most likely file.

I'd like it to be as automated as possible. I receive the txt file, make sure each file name is on a separate line then a program or script or whatever goes out and picks out the files (or most likely files f... Read more

A:search multiple files, copy+paste to new folder (batch file software?)

Contact Rent-A-Coder, Elance, or any of the other programming for hire sites. They could knock this out pretty quickly I would think.

5 more replies
Answer Match 78.96%

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

More replies
Answer Match 76.44%

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"
 

2 more replies
Answer Match 76.44%

I'm currently in the process of copying files back from the cloud in the exact same location where I had them before and now it says that the file name is too long and prompts to see whether I want to skip the file or not. The error message given does not
give the full file name or the path so it is impossible to see which files were copied successfully or not. This never happened with XP! Then afterwards I found that some of the files with long names did copy successfully whereas others didn't. I find this
to be a very user unfriendly process and I'm totally confused! These are critical files and I'm sure I haven't exceeded 260 characters or whatever. This is soOoO frustrating!!

C

A:file copy error message not sufficient + file name too long will not copy

Hi ,

There is a limit of filename length within Windows Explorer. In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which
is defined as 260 characters.
The shell and the file system have different requirements. It is possible to create a path with the Windows API that the shell user interface is not able to interpret properly.
This means that your long filename can only be handled at the command prompt level and you cannot drag and drop an illegal length filename within Windows Explorer.

Please simplify your folders and titles.

More information, please check the part of Maximum Path Length Limitation in the link below.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspxTracy Cai
TechNet Community Support

5 more replies
Answer Match 75.18%

Hello,

I need help to create an Excel macro that would

1. ask users to select x number of rows to be copied from one worksheet of one Excel file
2. once users have selected the rows to be copied, then the rows are copied from the one original Excel file into X number of target Excel files

Notes:
the target Excel files are all based on the same template
there is one worksheet in each of the target Excel files

in the target files, the rows should be copied from the first available empty row, going down

Looking forward to your help!

Thanks a lot.
Mzz
 

A:Macro needed to copy x number of rows from one Excel file into a batch of Excel files

Hi, welcome to the board.
Not much info there to get the correct picture.
Sample? Of source and template please
And not to forget, what version of Excel are you and the users using?
 

1 more replies
Answer Match 75.18%

I have created a batch file(file1.bat) to run on every machine to create a batch file(file2.bat) to a launch a page at windows startup.
This is the content of file1.bat:
@echo off
@echo>"C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\file2.bat
@echo start http://www.msn.com/> C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\file2.bat
Expected result is to copy the file2.bat to startup of each user profile.  However, The file2.bat is not copied to the startup folder on windows 7, 8, 10 after testing.
However, this will work in file1.bat:
@echo off
@echo>"C:\Testing\file2.bat
@echo start http://www.msn.com/> C:\Testing\file2.bat
I do not have a domain joined network.  I need to send the file1.bat to all staff.  I plan to deploy to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup. 

Thanks in advance to all.  Any help is appreciated. 

More replies
Answer Match 75.18%

I have created a batch file(file1.bat) to run on every machine to create a batch file(file2.bat) to a launch a page at windows startup.
This is the content of file1.bat:
@echo off
@echo>"C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\file2.bat
@echo start http://www.msn.com/> C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\file2.bat
Expected result is to copy the file2.bat to startup of each user profile.  The file2.bat is not copied to the startup folder on windows 7, 8, 10.
However, this will work on file1.bat:
@echo off
@echo>"C:\Testing\file2.bat
@echo start http://www.msn.com/> C:\Testing\file2.bat
I do not have a domain joined network.  I need to send the file1.bat to all staff.  I plan to deploy to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup. 

Thanks in advance to all.  Any help is appreciated. 

More replies
Answer Match 73.92%

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

6 more replies
Answer Match 73.92%

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

10 more replies
Answer Match 73.92%

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.
#!/bin/bash
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 \
cd %USERPROFILE%
dir /D /N 0
pause
for /D %%f in (XX*) do rmdir %%f /s
pause
%comspec% /k
pause


Thank you

A:Batch file or command to delete directories named in a text file

It's easiest to clean out the files before removing the directory.
echo Y|del *.* will clean out the files in a directory as long as there are no hidden or system files, you need to remove the attributes of files with the attrib command before the bat will delete the directory.
the echo Y| simply answers yes to any confirmation messages

1 more replies
Answer Match 73.92%

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

4 more replies
Answer Match 73.92%

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.

9 more replies
Answer Match 73.92%

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.

Thanks,
Jash
 

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

6 more replies
Answer Match 73.92%

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

C:\>set target=Squashman

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

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

C:\>

 

3 more replies
Answer Match 73.92%

First off, let me say that I'm not sure if I'm infected or not. But my computer has been acting suspiciously ...

I had just started up my PC and I was looking at some settings for AutoDefrag (this could have just been coincidence) when Comodo Defense+ showed me a warning. Basically, WMIADAP.exe was trying to modify a file or a registry entry (I'm sorry but I don't remembner which). I know that WMIADAP.exe is a system file, but it was in a strange location:

C:\Windows\winsxs\amd64_microsoft-windows-wmi-core_31bf3856ad364e35_6.0.6001.18000_none_15729e98d7f61129\

I stupidly allowed this, since it was before I saw the unusual location of the file.

Looking through Comodo's logs, I see that it tried to modify the file C:\Windows\System32\wbem\Performance\WmiApRpl.h

To calm my suspicions, I tried to upload WmiApRpl.h to both Virustotal and Jotti, as well as Avira's sample submission page but the Performance subdirectory containing the modified file does not show up in a "file upload" window! This really worries me.

Subdirectories of C:\Windows\System32\wbem\ that show up under Explorer:

Autorecover
en-US
Logs
MOF
Performance
Repository
tmf
xml

Subdirectories of C:\Windows\System32\wbem\ as seen through VirusScan/Jotti/Avira "upload file" window

AutoRecover
en-US
Logs
Repository
tmf
xml

Both the Performance and MOF directories are missing in the upload file window, which does not allow me to upload the modified file Wm... Read more

More replies
Answer Match 73.92%

Hi,

I have a file in a folder on a network drive whose path is : "\\sql\imp\ssis"

I need a windows batch file that looks into the above folder for a file with a name like : "abcd_03052012_84373.txt" .

The above file name has a date embedded in it in "ddmmyyyy" format. I want that to be extracted and put into a variable or a file somewhere so that I can read that later and store into a sql table.

Please help.
 

A:Solved: Extract Date from File Name - Using Windows Batch File

6 more replies
Answer Match 73.92%

I want a batch to select and open a random link file in a folder i have. All the links are music videos I like to listen to, and I kind of want to just have an option for 'surprise me!'.
I can change the file names if I have to, and I have a basic batch file ability. I know the simple commands, but nothing of the variables, signs-involving commands (&%!?), etc.

Also, I want to learn a whole lot more about programming/java/batch file, so it'd be awesome if any code could be explained. Thank you, in advance

A:I need a batch file to open a random file within a certain folder/path

There's a free Windows scripting language called Autoit3 that would do this task easily using these functons:

Random
_FileListToArray

AutoIt - AutoItScript
It has a Basic like syntax and is easy to learn.

Another popular scripting for Windows is AutoHotkey
AutoHotkey: macro and automation Windows scripting language

The syntax can be confusing but it has object support and is more powerful.

Of course there are tons of others for Windows:
Rexx
Python
Perl
Ruby

Here's a list. The details for each tell which OS are supported:
Free Programming Languages - Freebyte's Guide to

5 more replies
Answer Match 73.92%

I've come into contact with Mandriva Linux. I know of a concept called standard permissions, that it provides. It's pretty convienient. I don't exactly know how it really works under the hood or anything, and I don't need to know exactly how it works right now either, even though it's probably available.

What I want to do, in effect, is create a feature pretty close to equivelant of this feature, only for Windows XP. I want to set standard permissions using a batch file. Whenever this batch file is run as administrator it can enforce the permissions. What are these permissions it enforces? Well, what I want is for these permissions to be gotten from a text file. The syntax in no way resembles the syntax of the Linux file I'm describing.

Basically the syntax is this:
PATH <TAB> MODE <TAB> USER1,USER2,... <TAB> PERM
PATH <TAB> MODE <TAB> USER1,USER2,... <TAB> PERM
...
The path is the path to a file or folder in exact syntax. The mode is one of the switches that can be given for XCACLS in the Windows Resource Kit thingy. This can be replace, edit, etc. The users are the user or group to add/replace/remove/etc, and there is a comma allowed so more than one user or group is allowed to be specified. The permissions are the permissions that you can specify in the utillity.

So the first thing the script needs to do, is call some program that safely detects whether or not the filesystem is NTFS or not. If the sys... Read more

A:Get ACL permissions from a text file enforced by a batch file in Windows XP

16 more replies
Answer Match 73.92%

Hi . I'm making a "PC TuneUp" project , but something is wrong . When the batch file tries to check for updates , it closes . Fortunately , i know that it closes because it doesn't find the file . But i tried everything - nothing worked . Please help !
Code:

@echo off
for /F "tokens=1" %%G in ('tasklist /V /NH /FO TABLE /FI "WINDOWTITLE eq TehDansorz"') do IF %%G==cmd.exe exit /b
if exist newest%winver%pctuneup.ver del newest%winver%pctuneup.ver
if exist %winver%pctuneup.ver del %winver%pctuneup.ver
set winver=Win7+WinVista
set ver=1.6a
set title=title TehDansorz's PC TuneUp for Win7/WinVista Version %ver%
title Requesting admin permissions ...

:: BatchGotAdmin
::-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Administrator privileges are required for this app to work .
echo Please click OK in the following screen .
PING 1.1.1.1 -n 1 -w 600 >NUL
goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

"%temp%\getadmin.vbs"
exit /B

:gotAdmin
title Got a... Read more

A:Solved: Batch file closes when downloading version file

7 more replies
Answer Match 73.92%

I have a computer that is a drone specifically for an outside LED sign. This computer is designed to never shut off and doesn't have any other program on it besides Operating System and the sign software. I need to create a batch file that I can place in the "start-up" folder that will open the program (LEDStudio10) and open the file that I want to play. I have already tried multiple attempts and I was hoping someone out there in sevenforums world would be able to point me in the right direction.

A:batch file open file for program in the startup folder

Task Scheduler. Create a new/basic task. You can invoke your batch script there. This can occur after boot completes, after user logon, etc. You can set it to run daily weekly hourly, etc. You can even have it delay X (preseleted time amounts) minutes/hours after boot/logon if you want.

Task Scheduler - Create New Task

1 more replies
Answer Match 73.92%

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.
 

3 more replies
Answer Match 73.92%

Hi there forum,

how do you change the Visual effects using a batch file or registry file.

Thanks,

Edward.

A:How to change visual effects using batch file or registry file?

Hello Edward, and welcome to Ten Forums.

The links in the blue note box under OPTION FOUR in the tutorial below may be able to help with this.

Visual Effects Settings - Change in Windows 10

more replies
Answer Match 73.92%

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.

1 more replies
Answer Match 73.92%

Hi there forum,

how do you change the Visual effects using a batch file or registry file.

Thanks,

Edward.

More replies
Answer Match 73.08%

So I recently had a case of hard drive failure in which basically nothing of value was recovered in the original directory structure, however the drive was full of .chk files from a chkdsk run. I ran a quick script to change all of the extensions to .jpg, and most of the files were in fact intact.

Many of the files, however, are either corrupt, or are simply not JPEG files, and so will not open with the .jpg extension. Is there any batch renaming application that can analyze files by their header data, and append the appropriate extension automatically for the most commonly used filetypes?

A:Batch file extension processing by file header?

Usually file recovery software does that (before the files are recovered as chk files). I don't know of any app that will do what you said though. But if you don't have too many files, use a hex editor to open them and rename accordingly. I use winhex (just for viewing though), but any other will do. Here's a few strings that may help:
JFIF .jpg
RIFF AVI LIST .avi
PNG .png
MZ .dll or .exe (at least 32-bit - dunno how they are for 64-bit or 16-bit executables)
moov somewhere in the file .mov (may not be at the beginning)
GIF89a .gif
ftyp .mp4
**\rtf1 .rtf
000001BA21000100 (in hex) .mpg (MPEG-1 at least - don't have MPEG-2 samples to test ATM)
3026B2758E66CF11 (in hex) .wmv or .asf

5 more replies
Answer Match 73.08%

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

6 more replies
Answer Match 73.08%

Hey I've written lots of batch files before, but it's been a while and I don't think I've ever tried to add external data.

I've got a list of folder names and I'd like to make a batch file that I can run every once in a while to copy a master file in each folder to a new file. I know this is long, but I know exactly what I want so I thought I'd be as specific as possible. I'd love to get an example script but I really do want to learn more--if I could get pointed in the direction of where to learn this stuff, that would be awesome.

So for instance the folders are:
folder1
folder2
folder3

And in each folder there is a master file that includes the folder name and the word master (for instance):
c:\folder1\folder1-master
c:\folder2\folder2-master
c:\folder3\folder3-master

And I want to copy the files to a new file:
copy c:\folder1\folder1-master folder1-copy
copy c:\folder2\folder2-master folder2-copy
copy c:\folder3\folder3-master folder3-copy

Now I don't want to do every folder every time I run the batch file, but I already have a list of the files that I have to make copies of. So I was hoping to have a text file with:
folder1 folder2 folder4 etc

Then the batch file would grab that info and run a loop till it ran out of info. So if the first data was folder1 it would put folder one in %data% or something and then:
copy c:\%data%\%data%-master c:\%data%\%data%-copy
Then the loop would go back and put the second data in %data%... Read more

A:more complex batch file data from external file

7 more replies
Answer Match 73.08%

Anyone know how to take the contents of a text file, numbers only, calculate and then store them as a value? I'll be constantly adding to this text file and they need to be calculate. Like the balance of a bank but a little different.
 
Please and thanks!

A:Batch File, Calculating the Contents of a Text File

I think that would actually be very hard to do as the numbers in your text file are not integers but text and doing calculations would not be possible. Is there any reason you can't use a spreadsheet to do this?

10 more replies
Answer Match 73.08%

Alright, so what I'm trying to do is list all the shortcuts & folders in the start menu and list all the shortcuts & folders on the desktop and put this into a text file. The reason is to get a full list of programs our teachers use before we re-image their machine and not all of their programs are listed in add/remove programs and not all programs make a folder in Program Files, that is why I'm trying to do it in this roundabout way. What I have so far is this:

@echo off
mkdir "p:\Program List"
DIR "c:\documents and settings\all users\start menu\*" /S/B/OD > "p:\Program List\%computername% Start Menu.txt"
DIR "c:\documents and settings\all users\desktop\*" /S/B/OD > "p:\Program List\%computername% Desktop.txt"

This works perfectly but the only problem is the file has these:
c:\documents and settings\all users\start menu\
c:\documents and settings\all users\desktop\

before each entry in the text file. Is there an easy way to remove these lines so the text files are easier to read? I've checked other sources and can't figure out how to get this to work...

A:[SOLVED] Delete text from .txt file in a batch file

Open the files in Notepad, click Edit, then replace, and enter the string C:\Documents and Settings\All Users\ and replace it with nothing (no entry).

:)

10 more replies
Answer Match 73.08%

Hi,

Can anyone tell me how to get part of a bacth file to read a line from a text file and then set it to a variable.

For example the file contains computername =computer1

how do i get the batch to read that and set computer1 to a variable that can be used within the batch file.

If possible what i would also like to be able to do is once set that to variable, compare it against the correct computer number and if incorrect go back into the batch file and set the line to the correct computer name

Any help is appreciated.

Thanks
 

A:Batch File Read Line Of Text File

7 more replies
Answer Match 73.08%

I have a text file located at \\thedrive\a folder\another folder\log.txt. This file contains several lines of this kind of data "jdoe upgraded 09-20-2011 13:42:49.62".
I have a batch file located "d:\folderName" that needs to read the "log.txt" file and obtain the local computer user username if it is in the file. If it is not in the file then a file is to be copied to the d drive from \\thedrive\a folder\another folder\ to "d:\folderName" and then run the file. This is what I currently have
@Echo Off
SetLocal EnableDelayedExpansion
::This line is just in case n has been defined before the batch file is run
Set n=
Set _InputFile="\\thedrive\a folder\another folder\log.txt"
For /F "tokens=*" %%I IN (%_InputFile%) DO (
Set /a n+=1
Set _var!n!=%%I
)
but the log file is not read. If I move the "log.txt" off the network it works just fine. I cannot move the "log.txt" file as other processes use it nor can I copy it.
 

A:Batch file to read from a network text file

Because you have Quotes around your file name you need to use the USEBACKQ option.

Please use CODE tags when posting code.

Code:
@Echo Off
SetLocal EnableDelayedExpansion
::This line is just in case n has been defined before the batch file is run
Set n=
Set _InputFile="\\thedrive\a folder\another folder\log.txt"
For /F "usebackq tokens=*" %%I IN (%_InputFile%) DO (
Set /a n+=1
Set _var!n!=%%I
)

 

1 more replies
Answer Match 73.08%

I need to write a batch file or vb script that will take the following share names (which are stored in a .csv Excel file) and then run the following command:

NET USE \\[entry from 1.csv file]

The object is to have this command establish a NET USE connection to each share name from the 1.csv file.
These are the first five entries from the 1.csv file:
\\s0002234\c$
\\s002631\c$
\\gb2130\c$
\\s00460\c$
\\gb2143\c$
\\gb3205\c$

Can you please write a command script that will do this for me? My OS is Windows XP Service Pack 2.
Contact me with any further questions.
Dennis
[email protected]
 

More replies
Answer Match 73.08%

Okay, so basically, I have a whole list of links in a plain text Notepad file, each link on a seperate line. All I am wanting to do is to add a bit of text before each link, specifically: 127.0.0.1 and a couple of spaces.

So this...
Code:

[SIZE=3]somelink.com[/SIZE]
becomes this...
Code:

[SIZE=3]127.0.0.1 somelink.com[/SIZE]
By now you've probably already guessed what I'm trying to do here and what it's for.

So I am wanting some batch file code, executable in a .bat file, which basically reads a Notepad text file, and then add "127.0.0.1 " at the beginning of each line with text on it. I am guessing this is probably a very simple piece of code for someone with some knowledge of MS DOS and batch file code, but that most certainly isn't me, and the only batch files I have ever written have been with help like now.

Thanks for any and all help in advance with this, much appreciated.
 

A:Batch File To Read And Modify Text File

9 more replies
Answer Match 73.08%

Any suggestions here would be appreciated but I think this is so bizzare or deep into Windows that I'm not expecting any. I am developing a scheduled task that will run every morning unattended. The script starts Excel and specifies a workbook to open. The 'workbook_open' event runs and when finished, starts another batch file (via Shell(batFile, 1) and shuts down Excel. The 'batFile' starts Access and specifies the database to open. The database runs an AutoExec function and then shuts Access down. This sequence runs fours times for four separate databases. Here's the problem:

When the scheduled task runs under my account, everything works fine. However, when we change the scheduled task to run under the System Administrators account (we have to do this for reasons not important here), the Excel/Access sequence for one, and only one, of the databases does not run. I have isolated the problem to the 'Start' commands for both Excel and Access. What appears to be happenng is that for the Excel 'Start', Excel starts but the 'specified' workbook is not opened, hence Excel just sits there as an open process not doing anything. When I changed the name of the 'specified' workbook, the Excel 'Start' works okay, opening up the renamed workbook. The same thing happens with the Access 'Start' command. Access starts but the 'specified' database does not open, hence Access just sits there ... Read more

A:DOS Batch 'Start' app file command cannot find file

I've found a workaround to this problem by renaming the parent folder to which the database's location folder trees. But I sure would like to know what caused this problem.
 

1 more replies
Answer Match 73.08%

Backround: I am a college student majoring in Information Technology with a focus in programming. I also work for my school's IT department as an IT associate. I have 4 years of experience dealing with hardware and software and have studied Net+ and A+ certification books.

Problem: At my school my boss, the IT Director, wants to schedule a batch file to run weekly that will delete items from the desktop and folders of the "Student" account on all of the student computers. He asked us associates to go around to every student computer with this batch file on a thumb drive and schedule the task. Seems simple enough right? The problem is we are talking upwards of 300 computers throughout the campus. I proposed a solution to him where we would use a script that would essentially consult a text document with the names of all of the student computers in it, then run the file.

I am 99% this can be done, I just have a very small amount of programming experience. If anyone has an answer or knows of an easier way to accomplish this I appreciate it. Thanks in advance.

EDIT: All student workstations are running Windows XP SP2
 

A:VB Script to Run a Batch File and Utilize a Text File

16 more replies
Answer Match 73.08%

Hi, I was wondering if it is possible to make a batch file that will open a file with a specific program?

Say I want to open "targetA.txt", with the program "noteviewer.exe"
Is it possible with batch file? or not?

If it is, could you please show me how?
 

A:making a batch file open a file with particular program?

10 more replies
Answer Match 73.08%

Hi,

I want to write a batch file to add the numbers. The inputs are in the text file. I need to add all the numbers in the text file that are in consequent lines. Please help me in doing that by giving an example.

Regards,
Menaka B
 

A:Batch file that takes input from text file

7 more replies
Answer Match 73.08%

On my XP backup batch file, I am doing a comparison of the total files in the source and target directories to confirm they are the same (and consequently everything backed up ok). What I am trying to do is display the final file total line, excluding all of the other file total lines of the individual folders. Additionally, I want to exclude system files from the total, as I am not backing them up.

I am using "dir /s /a-s d:\*.* | find "File(s)"

This give me the total lines of all folders in addition to the final total files and bytes which is the only line I want.

I have used attrib with find /c /v "", which works, however I cannot find a switch with attrib that will exclude system files.

Any ideas?

A:Batch File find final file total

Try this look for /exclude (scroll down)

2 more replies
Answer Match 73.08%

I wrote this batch file which does what I want it to do so far.


Code:
@echo off

"C:\Users\xxxxxx\Documents\HideTaskbar\HideTaskbar.exe"
"C:\Program Files (x86)\VideoLANold\VLC\vlc.exe"
"C:\Users\xxxxxx\Documents\HideTaskbar\ShowTaskbar.exe"

exit
VLC is a video program so I want to associate video files to this bat file. This would mean that when i clicked on a video file in Windows Explorer, the bat file would execute and VLC would open the file I double clicked. At the moment the only thing that happens in this setup is that the bat file executes like normal but no video is played.

Is this possible, and if so how can I accomplish it?

A:How can I write a batch file that opens a file in a program?

Have you tried associating the video files to open with VLC by default ?
Maybe you don't need a BAT file ?

Default Programs - Associate a File Type or Protocol

9 more replies
Answer Match 73.08%

I'm having a problem with a very long (125+ page) and extremely crucial Office 2007 Word document. Two strange things have started happening: First, when I try to close the file I get an error message that says: “Cannot close file. File is open in another location” (which, of course, it isn’t). In order to close the file, I have to do a “Save-as” and rename the file. However, when I open the newly created file, it only opens up as a "read-only" document which can't be saved or edited. To make matters worse, when I close the new file and reopen it, the new file becomes read-only as well. And on and on ad infinitum with every new file created from the original file!!!

When I check Properties for both the old and new files, “Read-Only” is not checked, so I'm really stumped. I've tried every method I know to correct both the File Open in Another Location and the Read-Only problems. I tried going to Task Manager to see if either the original file or the new file was actually running in another program, which they were not. I went into Event Viewer to see if there was any error in Microsoft Office, and I couldn’t find one (although, I’m not really sure how to find this exact kind of error). I tried to reopen both files from Windows Explorer, which didn’t help. I tried shutting down and rebooting which didn’t help. I even tried copying the contents of the new file and creating a newer file with a different... Read more

A:File Corruption: 'File Open in Other Location' + 'Read-Only'

It would be an interesting experiment to save the file as an RTF (Rich Text File), rename it, and then open it for editing in Word and see if the same problems happen.

The reason it would be interesting is, when you save Office files as Office files, they're written with Visual Basic code. VBA code is used in lots of applications and it affects "system" features like your ability to edit and save.

So, save the doc as a "Save As..." and in the white box at the bottom, click it, and a list will show up with the various other formats you can save as. RTF does not contain Visual Basic or VBA code.

RTF keeps formatting information, though special indents and numbering systems may look a little funny afterward.

3 more replies
Answer Match 71.82%

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
Code:
[COLOR=red]for /f "tokens=1 delims=[" %%G in ("PHASEID" %path%\%myfile%) DO ([/COLOR]
[COLOR=red]set PhaseID=%%G[/COLOR]
[COLOR=red])[/COLOR]
[COLOR=red]echo Phase: %PhaseID%[/COLOR]
pause

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

PLEASE HELP, lol

Code:

:StartSet
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

16 more replies
Answer Match 71.82%

Hi all, I need to change the name of a file that I am FTP'ing each day automatically. I'm not very good with batch files but here is my code.

@echo off
G:
cd "G:\nmc\Business Operations\Development\Earned Revenue Report"
> script.ftp echo stpan
>>script.ftp echo krtssss
>>script.ftp echo cd /home/users/ftprpts
>>script.ftp echo bin
rem how do i change the day of mon (04) in filename each day ???
>>script.ftp echo get erevrpt_04.csv
>>script.ftp echo bye
ftp -v -s:script.ftp -i krst.xyz.org
erase script.ftp
@echo on
 

A:Solved: Batch file - place day in file name

9 more replies
Answer Match 71.82%

Hy there
I want to load a file in a program from a batch file, problem is that I don't know the name of the file so I need something like:

========================================
@echo off
start c:\Program Files\Sound Forge\Forge.exe d:\*.wav
========================================
so if there is a way to load a file without knowing the name i''ll apreciate it
Thanks for your time in advance.
 

A:How to load a file in a program from batch file

The program would have to support loading files using a wildcard, or by specifying a folder of files to load.

If it doesn't, you could use a For loop to generate a list of file names to be used in the Start command.

This will pass the complete path for each file located in one folder. It does not get filenames from subfolders:

Code:
@Echo Off
Set _List=
Set _Folder=D:\
Push %_Folder%
For /F "Tokens=* Delims=" %%I In ('Dir "%_Folder%\*.wav" /A-D /B') Do Call _Build "%%~I"
Start "" "C:\Program Files\Sound Forge\Forge.exe" %_List%
Goto :EOF
:_Build
Set _List=%_List% "%~f1"

You are limited to 8191 characters per line, so depending on where the files are, you can quickly reach that. The start command uses 65 characters leaving 8126 for the files in the list.
For example, if the files are in C:\Documents and Settings\Administrator\My Documents\My Music\Samples\, that will use 70 characters per file, plus the length of the file name. Assuming only 11 characters per name, + 3 characters per file for quotes and a space between names, you'd be limited to 96 files.

This version switches to the folder containing the files so you don't need to specify the path, but some programs might not like having the working folder changed:

Code:
@Echo Off
Set _List=
Set _Folder=D:\
Push %_Folder%
For /F "Tokens=* Delims=" %%I In ('Dir "%_Folder%\*.wav" /A-D /B') Do Call _Build "%%~I"
Start &... Read more

1 more replies
Answer Match 71.82%

I have a batch file that essentially stops my virtual server, copies files, starts virtual server, compresses files and finally removes temp folder.

I would like to have a ini file to store information like:

VMStop Path=cd c:\virtual machines\vmware\vmware server
VMStop Command=call vmware-cmd "c:\virtualmachines\xp\xp.vmx" stop
CopyPath=C:\backups\server1
VMStart PAth=cd c:\virtual machines\vmware\vmware server
VMStart Command= call vmware-cmd "c:\virtualmachines\xp\xp.vmx" start

I was able to put a ini file in place and store set commands in it and pull those out, but not sure how to do teh above. Any help would be appreciated.

S
 

A:Pull information from a ini file from batch file

7 more replies
Answer Match 71.82%

Hi,
Can anyone out there write me a batch file or exe file which will also change permissions in the Windows registry?

What I am trying to do is to block social networking sites - Facebook, Twitter etc.
I normally do this by editing the windows hosts file by looping back all known sites to the local machine.
I then change the permissions to read for all users including admins.
Next I change the file to read only & hide it.
I would like this batch/exe to be easy to change as other social networking sites etc appear.
I would also like this batch/exe to work across Windows platforms XP Vista & 7
If there was a problem with the location of Windows then assume the operating system is installed on C:
Can this be done? or am I asking the impossible. (or is there an easier way of doing this)

Thanks for any help

Rob
 

A:edit hosts file using batch/exe file?

8 more replies
Answer Match 71.82%

Hi, I would like to read text file e.g. abc.txt from batch file. There will be only one line in abc.txt file as given below... InstallationPath REG_SZ C:\Program Files\XYZ\My SoftwarePath\I would like to read the path i.e. "C:\Program Files\XYZ\My SoftwarePath\" with blanks in it.Please guide me to solve this problem.Thanks.Regards,Mukund

A:Need to read a text file from a batch file

Not very clear, but if you want to set a var try this:[email protected] off & setLocal EnableDELAYedExpansionfor /f "tokens=1-2* delims= " %%a in (abc.txt) do (set var=%%c)echo !var!=====================================Helping others achieve escape felicityM2

2 more replies
Answer Match 71.82%

I intend to spool a batch file activity (whatever shows up in command window while batch is executed) to a log file in XP.

I tried to use setlocal and endlocal as mentioned in microsoft but found that they are specific to DOS and cant be used for XP.

Can someone help me with this? Thanks.

A:Spooling Batch File Activity To A Log File In Xp

someone please help me with this...

3 more replies
Answer Match 71.82%

I have a folder with sequentially named images (a0001, a0002, a0003, etc.) and I was wondering if there was a way to delete every 3 files without touching the others.

So for example, I have: a0001, a0002, a0003, a0004, a0005 a0006, a0007, a0008, a0009

And after I would like to have: a0001, a0005, a0009

I've seen a couple batch files around that don't do exactly the same thing, but I'm not sure what I would need to modify.
 

A:Batch File/Command: Deleting every Xth file

Would like to see the examples you saw. But what I would do is setup a for loop to list all the files in the directory. setup a counter. When the counter does not equal one delete the file. after you have deleted the 3rd file (essentially the 4th file in the list) reset the counter back to zero.
 

1 more replies
Answer Match 71.82%

Hi,

I need some kind of program/batch file that will place the current IP address (I have dynamic so it changes every two hours) in a text file that I have specified. The text file would have to be in this way:
|Date|Time|xxx.xxx.xxx.xxx|
|Date|Time|xxx.xxx.xxx.xxx|
Click to expand...

ie:
|6/11/2004|1326|220.025.152.015|
|7/11/2004|2226|220.025.152.153|
Click to expand...

I am using graburl to update my host of my location, so I thou ht that I could use graburl to do something like this. If it is not possible to include date and time in the text file it is not completely required. However the latest IP address would have to be at the top of the list not at the bottom (This must also happen even if date and time columns are in the list).

Any help would be great.
Cheers
 

A:Batch file that will put current IP in a text file

12 more replies
Answer Match 71.82%

HI can anybody please post me a batch file which will let me automate saving a file to directory on a server or point me in the right direction on how to create one it need's to run at a set time every day .Please help
 

A:Need A batch File to automate saving of file

16 more replies