Over 1 million tech questions and answers.

Is there a Script or batch file that can create folders by date range

Q: Is there a Script or batch file that can create folders by date range

I was wondering if there was a way to create a set of folders in a specific directory according to a date range that i input.

ie.

Select start date 2011 10 01

select end date 2012 10 01

Select Output path of c:\users\XXXX\desktop\export data

and it creates a folder for all days from 2011 10 01 through 2012 10 01 and places them in the output path i have set for it.

any help would be greatly appreciated.

Thank you

RELEVANCY SCORE 200
Preferred Solution: Is there a Script or batch file that can create folders by date range

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: Is there a Script or batch file that can create folders by date range

Welcome damjohnron to the windows 7 forums.

Here are some snippits of a dos batch file that will create a directory with the datek and tell you if it already exists.


set DATEST=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%
echo %datest%
rem if it looks ok, then you can press enter to continue
pause
if exist %homepath%\documents\%datest% goto dup1
md %homepath%\documents\%datest%
rem the pause can be taken out if you wish.
pause
go to end
:dup1
rem you already have done this.
pause
:end

you can change the path statement to the directory you wish.

This batch file can be run each day that you want to create a new sub directory.
There are other ways to do this but a bit more complicated such as reading an external
text file for the directory names.

Rich

Read other 4 answers
RELEVANCY SCORE 91.6

Hi

I am using following batch file for cleaning the desktop and also for taking backup of desktop:

@echo off

set curr_date=%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%

mkdir "%USERPROFILE%\My Documents\backup\%curr_date%_backup"

xcopy "%USERPROFILE%\Desktop" "%USERPROFILE%\My Documents\backup\%curr_date%_backup" /D/S/H/V/C/F/K/Y

for /d /r "%USERPROFILE%\Desktop" %%x in (*) do rd /s /q "%%x"
for /r "%USERPROFILE%\Desktop" %%x in (*) do del /f "%%x"

copy "%USERPROFILE%\My Documents\backup\%curr_date%_backup\*.lnk" "%USERPROFILE%\Desktop\"

del /q "%USERPROFILE%\My Documents\backup\%curr_date%_backup\*.lnk"

In the first line I am creating a folder with current date, e.g. curr_date_backup. Second, copying the contents of Desktop to the newly created folder. Third, deleting directories from the desktop. Forth, deleting files from the desktop. fifth, Copy back all the shortcuts to the desktop. sixth, deleting all the shortcuts from Current date folder.

This batch file is working perfectly in Windows XP. It works in win 7 also but the problem is that the name of the current date folder created by first command is "Desktop". when I use command prompt to check the name, the name is correct. I checked the properties of the folder the correct is there also. But in windows the name doesn't match with the expected one.

I need help. Kindly tell me what's going on? why window 7... Read more

A:How to create a current date folder using batch file?

Works for me, at least the first two commands work as advertised.

test.bat
set curr_date=%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%
echo %curr_date%"

mkdir "%USERPROFILE%\My Documents\backup\%curr_date%_backup"
dir "%USERPROFILE%\My Documents\backup"






Quote:
C:\Users\xxxxxxx>set curr_date=2011-11-21

C:\Users\xxxxxxx>echo 2011-11-21"
2011-11-21"

C:\Users\xxxxxxx>mkdir "C:\Users\xxxxxxx\My Documents\backup\2011-11-21_backup"

C:\Users\xxxxxxx>dir "C:\Users\xxxxxxx\My Documents\backup"
Volume in drive C is D370_C
Volume Serial Number is C89E-70E8

Directory of C:\Users\xxxxxxx\My Documents\backup

11/21/2011 01:30 PM <DIR> .
11/21/2011 01:30 PM <DIR> ..
11/21/2011 01:30 PM <DIR> 2011-11-21_backup
0 File(s) 0 bytes
3 Dir(s) 28,082,577,408 bytes free

Read other 8 answers
RELEVANCY SCORE 90.8

Hi everybody - My problem is that I have 100 identical printers, all the printers have network connectivity onboard.

I want to create 100 print queues for these printers, however I don't really want to add each lpr port/print queue manually !! Is there anyway that this can be done via script or batch file ??

Thanks in advance

Ron
 

Read other answers
RELEVANCY SCORE 88.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 87.6

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 78.4

Searching for files modified in a specified date range (of the past 3 days) gets a search result list titled "date modified", and with the column heading "Date Modified" but the date listed against a file modified today is wrong. The date displayed matches the file creation date & is within the specified range ... but how do I know what the Search is doing?

Can't trust it... !

A:File search (by date range) displays incorrect Mod Date in results

That is very strange. Bump for a possible solution, since I can't think of one off the top of my head.

Read other 1 answers
RELEVANCY SCORE 76.8

hello to everybody

I need batch code to check if date is modified in three files and that date should be compared with current date (%date%).If so,do some job,otherwise quit (exit /b)

I found a bunch of solutions but what troubles me is date format.
On my machine it is dd.mm.yyyy

Thanks in advance.
 

A:Solved: batch to compare file modified date with current date

Read other 10 answers
RELEVANCY SCORE 76.4

I want to create a batch script which can search for .jpg and .jpeg

I am new to this script language, so don't no how to search, so I am posting this thread here.

Please can anyone tell me the batch script which can search all drives and folders and subfolders in a computer for .jpg and .jpeg, once found they must get copied.

Please help me with this, please give me the script code for this.

Read other answers
RELEVANCY SCORE 75.6

I want to know an exel formual for the following - Any help would be great

Date Range
01/12/2013 - 03/14/2013

How many days from the date range 01/22/2013 - 02/21/2013 are in the above date range

So answer for the above would be 31

Thank you for your help!
 

A:Excel 2010 - Count # Of Days In A Date Range That Are Part of Another Date Range

Hi LucianC - try entering this info:
Start Date in A1
End Date in B1
=DateDif(A1,B1, "D") in C1
 

Read other 2 answers
RELEVANCY SCORE 75.6

Hello!

I'm having trouble creating a batch script to simply copy a shortcut to the desktop from a program installation, then carry out some tasks.

Overall my goals are:
Burn a CD that includes a autorun.inf that will load a batch script
In the script I want it to activate two self extraction archives
1.
activate a self-extraction archive to install the necessary files to C:\Program Files (x86)\Software
2. (once 1. completes)
activate a self-extraction archive to install the necessary files to C:\Program Files (x86)\Software\Content

Then finally have the batch script create a shortcut from C:\Program Files (x86)\Software\Softwarename.exe
to
%userprofile%\Desktop\softwarename.ink

Any advice will be appreciated. thanks in advance..

A:Creating a batch script or use a 3rdpartyprogram to create shortcuts

Still looking for a solution!

Read other 4 answers
RELEVANCY SCORE 75.6

Hello,

I have the following batch file that works great, until I happen to execute it on a file with a + in it.

@echo off
cls
for /r %%f in (*txt) do copy %%f m:\text files

I searched around for a bit, but I couldn't get any of the information I found about escape characters to work. How can I make the batch file treat the file name in %%f as a literal?

Thanks!
 

A:Batch script to create files with special characters

Read other 10 answers
RELEVANCY SCORE 75.6

Create a batch script for Oracle ODBC connection
 

Read other answers
RELEVANCY SCORE 74.8

so im an IT specialist at a big car dealer ship im not that good with scripting but what i want to do is when i go around to a computer i want to be able to put a flash drive in run a batch script that creates a folder on the C drive transfers a few files (xml and .bat ) to that folder then from that folder i want to run the batch script that will create a scheduled task to run ccleaner when the pc is in idle for 10 min
we have 600+ pc's some are on the domain some are off the domain with various user names/passwords and pc names also different os's (xp win 7 and some vista) some are 32 bit but most are 64 bit


ok so i made a scheduled task on my pc then exported the XML i put the files on a flash drive then i made a batch to copy the other batch scripts/xml's to a folder on the c drive (that part im having no issue with )only issue i have is when i try to run the batch to make the task on a different pc then the one i created it on i get a message saying "error: no mapping between account names and security ID's was done <17,8>:logon type
i plan on just popping in the flash drive and running these scripts as i go around doing the preventive maintenance or wile im on a pc to troubleshoot an issue


here are my scripts

this one is run off the flash drive and creates a folder on the c drive i have no issues with that but im posting it just as a reference

@echo off
REM Check if 32 or 64-bit OS
if "%Processor_Architecture%"... Read more

A:creating a batch script to create a scedualed task on multiple pc's

Hi there,








  
Quote: Originally Posted by joeykong


only issue i have is when i try to run the batch to make the task on a different pc then the one i created it on i get a message saying "error: no mapping between account names and security ID's was done <17,8>:logon type


Is this the only issue?

It's not a problem with batch but with Task Scheduler. Before you can import a task that originated from another computer, data contained in the "UserId" element of the task xml has to be changed to match up with a user that exists on the machine you are importing the task to.

E.g.

Code:
<Principals>
<Principal id="Author">
<UserId>COMPUTERNAME\Username</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
The part in red must be changed to one of the users of the machine you are trying to importing this task to.

Read other 2 answers
RELEVANCY SCORE 73.2

Hey there,

How can I create multiple folders in Outlook 2007? Specifically, I have a list of 50 names, and I want to create a folder for each, in one batch.

Is this possible? Any suggestions?

TIA
 

Read other answers
RELEVANCY SCORE 72.4

Hi,
Can anyone help me how to create a batch file or vbs script to install multiple windows patch (.exe) file from a network share folder. Also I want get the individual log file of all user including hostname.
So please help me because we need to deploy multiple patches in around 100 PC and we are not using any WSUS  server and windows automatic update.

Thanks & Regards
Rakesh Kumar

Rakesh Kumar

Read other answers
RELEVANCY SCORE 70.8

Hi,I tend to do the following alot:
Create multiple folders, give them specific names
open the folders, fill them with shortcuts to programs
change the names of the shortcuts
change the icons of the shortcuts

So I am wandering, is it possible to create a script to do the above?

1.) create several folders, give them different names
2.) fill the folders with shortcuts to programs having the correct names and icons
 

A:script - create folders containing shortcuts to programs

Copy the code below into a text file and rename the .txt extension to .vbs

Just change the "Create Folder Path" (line 2) to reflect where you want the destination folder to be created. Also change the Save Path and Link name in line 4 as well as the Target path of your application in line 5. Save the file and then double click to execute. You will need to refresh your desktop or directory by clicking F5 in order to show the newly created folder. In my example below I copied the file MSConfig.exe to the root of my C: drive and then used the script to create a shortcut to it inside the folder "Test" on my desktop. I'm not sure how to change the icons via code so maybe someone else could help out ??
Code:
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateFolder("C:\Documents and Settings\euza116\Desktop\Test")
Set objShell = WScript.CreateObject("WScript.Shell")
Set objShortCut = objShell.CreateShortcut("C:\Documents and Settings\euza116\Desktop\Test\Your_Link_Name.lnk")
objShortCut.TargetPath = "C:\MSConfig.exe"
objShortCut.Description = "Shortcut_to_ MSConfig"
objShortCut.Save

Here is the same code in VBA Just change the path names to reflect the correct application and save paths. You can add this code to a module within MS Word or Excel or other MS Office Application.
Code:
Public Sub CreateDirectory()

Set objShell = CreateObject("WScript.Shell"... Read more

Read other 3 answers
RELEVANCY SCORE 70.4

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
 

Read other 2 answers
RELEVANCY SCORE 70.4

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

Read other 6 answers
RELEVANCY SCORE 70

I need to know how to create a batch file that will post to an ftp by looking for a file with a specified date. It's a two step process. First, a batch file is run to encrypt, and the output file is KML_06082004.pgp. Then another batch file needs to be run to post a file to a client's ftp site. Currently, what I'm doing is going into the second batch file that posts the file and changing the date every week to the current date in the mmddyyyy format. I've been looking online for a way to run it so I don't have to change the date every week, but all I keep finding is how to encrypt a file with the date as part of the name, and I already know how to do this. This is the code that encrypts the file

Note...Actual names have been changed to protect the innocent.
--------------------------------------------
echo off
set year=%date:~10,4%
set month=%date:~4,2%
set day=%date:~7,2%
set newdate=%month%%day%%year%
echo %newdate%

Pause

C:
cd gnupg
gpg -o C:\KML_%newdate%.pgp -r xxxxxxxx -e C:\KML.txt
------------------------------------------------------------

This is the file that sends it out...(minus the username and password of course)
------------------------------------------------------
open ftp.myftp.com
lcd C:\
binary
put KML_06082004.pgp
quit
-----------------------------------------------

Anyone got any solutions or a link that can help me out? It's not like this is killling me doing this, it's just annoying having to change this every ... Read more

A:Date for batch file

Okay, just a thought here (and let me warn you, my DOS is a bit rusty...):

Add a couple of lines to your batch file that instruct it to move the file to a \sent subdirectory when the process is complete (or use copy then delete the file from the original subdirectory). The only file that will ever be in the root directory will be the current one to be sent, so use a wildcard to pick it out and send it (I also believe in putting this stuff in a subdirectory, not directly into root C) :

-----------------------
open ftp.myftp.com
lcd C:\
binary
put KML_*.pgp
move c:\KML_*.pgp c:\ftpSent\*.*
quit
----------------------------------

Let me know if this works,

MBN
 

Read other 2 answers
RELEVANCY SCORE 70

Wondering if anyone in this forum can help me figure out what I am doing wrong with my script. I am grabbing a text file with a list of users in it. I want to then create folders for all those people and then set explicit permissions on those folders to only allow the users and admin access to it. So for the create user folder, I have...

$Users = Get-Content "C:\Users.txt"
ForEach ($user in $users)
{
$newPath = Join-Path \\mycomputer\Users$ -childpath $user
New-Item $newPath -type directory
}

This works great as I now have 100 folders created. But how do I use something like....

$acl = Get-Acl "\\mycomputer\users$"
$permission = "mydomain\$users","FullControl","Allow"
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission
$acl.SetAccessRule($accessRule)
$acl | Set-Acl \\mycomputer\users$\$user

When I try to loop these together it says the folder already exists or the setaccessrule identity references could not be translated.

Anyone know how I loop it in with creating the folder? Or is there a way to just say...create folder based on this username, then take that username and make it the only admin on the folder along with the system admin??

A:powershell script to create user folders and set permissions

answered my own problem...but maybe someone can help me out from here. This works for creating folders and setting permissions.

$Users = Get-Content "C:\Users.txt"
ForEach ($user in $users)
{
$newPath = Join-Path "\\myserver\Users$" -childpath $user
New-Item $newPath -type directory

$acl = Get-Acl $newpath
$permission = "mydomain\$user","FullControl","Allow"
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission
$acl.SetAccessRule($accessRule)
$acl | Set-Acl $newpath
}

Anyone know how I would then look at an old server with user folders and do a stare and compare between the old and the new ones I just created? And once I find a folder that matches I want to grab all the contents in the old server and robocopy it over to the new server.

Read other 3 answers
RELEVANCY SCORE 69.2

Well, I'm sitting here and can't this to work right.
Here's what I want to do:
- Login to a ftp server
- Download qconsole.log from demott
- Upload the same file to another folder at the remote server. (/logs)

Then the next thing:

I want then to upload this file from /logs to another FTP server, could anyone give me an example how to do that? Anyway here's my code:

Script.bat
Code:
FTP.EXE -s:SCRIPT.TXT

Script.txt:
Code:
open **.***.**.*** [COLOR=Red](IP)[/COLOR]
******** [COLOR=Red](USERNAME)[/COLOR]
******** [COLOR=Red](PASSWORD)[/COLOR]
lcd c:\logs
quote PASV
cd /demott
quote PASV
get qconsole.log
cd /demott/logs
quote PASV
put qconsole.log

 

A:Help with a Batch file script (FTP)

Hi mariusk,

Welcome to TSG !

You may adapt your script this way :
Code:
[SIZE=2]
open **.***.**.*** (IP)
******** (USERNAME)
******** (PASSWORD)
lcd c:\logs
quote PASV
cd /demott
quote PASV
get qconsole.log
cd /demott/logs
quote PASV
put qconsole.log
[COLOR=Red]close
open **.***.**.*** (NEW IP)
******** (USERNAME)
******** (PASSWORD)
lcd c:\logs
quote PASV
cd /logs
quote PASV
put qconsole.log
quit[/COLOR][/SIZE]

 

Read other 2 answers
RELEVANCY SCORE 69.2

Me and my friends are constantly plagued by Local Area Network connection issues when trying to connect to each other for streaming, game, etc. I was wondering how to create a file (like a batch file or script) that would execute the following commands to make the process quicker and easier to set computers up for a LAN.

- disable windows firewall
- disable/enable network adapters
- end unneeded processes such as ituneshelper.exe, ApplemMobileDeviceService.exe, etc.
- set computer's IP address to a specific static one (i.e. 192.168.1.10) as well as dns servers to particular settings

The whole point is to ease the process of connecting several computers on short notice in a short amount of time. I just need help learning how to write such a script or batch file or something that can execute all these things.

Thank you in advance for your help

A:batch file/script help!

a lot of those would probably be done via netsh
netsh /? for help
(I haven't played with this much, but I'm sure it's not too hard to figure out, you have to play with it a lot though)
for example http://social.technet.microsoft.com/...9-df9eb5700561 for windows firewall

tskill for ending processes

Read other 9 answers
RELEVANCY SCORE 69.2

How can I do a batch file that automate the archival storage operation with a batch file?

thank you,

[email protected]
 

Read other answers
RELEVANCY SCORE 69.2

Hello,
I am somewhat familiar with using expressions in a batch file to get dates. One such expression might look something like this;

FOR /f "tokens=2-4 delims=/ " %%a in ('DATE/T') do SET date=%%c%%a%%b

Is there a way to modify this kind of expression so that I get the date minus one day?

Thank you for your help!

cdun2
 

A:Need to Set Date Back One Day in Batch File

Personally, I'd probably pick up a batch utility to solve this issue. One way would be to use AutoIt to do this task.
 

Read other 1 answers
RELEVANCY SCORE 69.2

How can I check the date in a batch file? I have one that I need it to call another batch file on a certain day, and want it to bypass this other batch file if it's not that day.
 

A:Date checking in batch file

Code:

if %date:~7,2%==29 echo go ahead
 

Read other 2 answers
RELEVANCY SCORE 69.2

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 69.2

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

Read other 16 answers
RELEVANCY SCORE 69.2

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]
 

Read other answers
RELEVANCY SCORE 69.2

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

My Requirement : I need a batch file to copy all .doc files in all my HardDisk to a removable disk say (Z: drive) . Can anyone make it possible using a batch file?Please...Its urgent...

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

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

Read other 4 answers
RELEVANCY SCORE 68.8

At work i use 2 different PDF viewing software. One is Adobe for editing and the other is Foxit for quick viewing. They have their pros and cons and so I use them interchangeably.

For some work I will use Foxit for several hours at a time and only open something in Adobe on an as needed basis using the right click "open with" context. The opposite is true, for some work I use Adobe for hours and then use Foxit as needed with "open with" context.

I want a registry file or some application that will enable me to simply double click on it and KNOW that my file association for PDF is now Foxit (or Adobe depending on what batch or registry file I double click on).

I see there is "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Explorer\FileExts\.pdf" which changes when I edit the file association in control panel. It does update, but I can't manually change the "UserChoice" Progid item. It changes only through file association in control panel.

I realize there are some in HKEY_CLASSES_ROOT but they dont update when i update it in file association in Control panel.

I don't know what to do or where else to look. It is tedious to have to go to the control panel -> file association manually.

Can someone help?

A:PDF file association REG or Batch Script

As for Foxit file association, that is easy.
Code:
"PathTo\Foxit Reader.exe" -Register
should do the trick.

But with Adobe Reader that is more complicated.
You can run repair function of it's MSI package with parameters /fum (f -to allow further parameters, u - rewrites user specific registry entries, m - rewrites other registry entries).

Or you can use registry monitoring software (some even in trial mode) like Total Uninstall to see what values are changed when you switch between Abode and Foxit. Once you will get these changes you can create two reg files for both cases. Or just one for Adobe and use code above for Foxit

Read other 1 answers
RELEVANCY SCORE 68.4

Hello Guys,

I need to create a batch file which renames a folder from one name to a date in the format of YYYYMMDD. I see where you can do it on a file but for the life of me I can't find out how to do it for a folder using the REN command. Any suggestions would be helpful.

Thanks in advance...
 

A:Batch File Help (Renaming a folder to a date)

AFAIK ren works the same on folders as on files. have you tried it?
 

Read other 1 answers
RELEVANCY SCORE 68.4

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 68.4

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 68.4

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 68

I tried looking a little on google, and couldnt find much. I need to make a batch file to add dns suffixs to local area connection.

i have a script that i tested but it didn't work, because i beleive it was for just the 2 local dns's and not for the dns suffixes.

Any help is a appreciated.

Update i found a script here. That works for now. Just need to figure out how to set it so it manually checks those 2 boxes.

On Error Resume Next

strComputer = "."
arrDNSDomainSuffixSearchOrder = Array("dns1.com", "dns2.com", "dns3.com")

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNicConf = objWMIService.Get("Win32_NetworkAdapterConfiguration")

WScript.Echo VbCrLf & "DNS Host Name: " & strDNSHostName & VbCrLf & _
" Attempting to enable DNS"
intEnableDNS = objNicConf.EnableDNS(strDNSHostName, strDNSDomain, _
arrDNSServerSearchOrder, arrDNSDomainSuffixSearchOrder)
If intEnableDNS = 0 Then
WScript.Echo " Successfully enabled DNS."
ElseIf intEnableDNS = 1 Then
WScript.Echo " Successfully enabled DNS." & VbCrLf & " Must reboot."
Else
WScript.Echo " Unable to enable DNS."
End If

WScript.Echo VbCrLf & String(80,"-")

Set colNicConfigs = objWMIService.ExecQuery _ ... Read more

Read other answers
RELEVANCY SCORE 68

I need script to change my WiFi IP to specific IP as well as DNS and then change back to DHCP.
I need to work on both College and Home network. So I am looking for script which changes WiFi IP.

I have got two files. But I am not sure whether it will work. Somebody help me in verifying the script. If it appears to be wrong, then please provide the correct script.

College IP script: 
@ECHO OFF
netsh interface ipv4 set address name="Wi-Fi" source=static addr=172.16.20.131 mask=255.255.240.0 gateway=172.16.16.2
netsh interface ipv4 set dns name="Wi-Fi" source=static addr=172.16.16.2
netsh interface ipv4 add dns name="Wi-Fi" addr=8.8.8.8 index=2
:EOF

Home IP script:
@ECHO OFF
netsh interface ipv4 set address name="Wi-Fi" source=dhcp
netsh interface ipv4 set dns name="Wi-Fi" source=dhcp
ipconfig /renew
:EOF

Please help me in verifying and identifying the working script to switch between college and home network IP.
Thanks in advance. Looking for a positive reply in soon.

Read other answers
RELEVANCY SCORE 68

So I have folders full of tv shows and a program that gives them all matching thumbnails but it saves them as .tbn files and my media server wants .jpg. So i wrote this script to run from my vidoes folder which contains all my tv shows.

Code:
@for /r %%i in (*.tbn) do ren "%%~fi" "%%~ni.jpg"
But now I am using xbmc as well and it looks for many thumbnails as .tbn so I want to change the script to rename any .tbn that is not named season00.tbn (00 being any two digits). If anyone could help me code this it would be much appreciated I tried for hours cause I know it should be a very simple if statement added in there but everything I try either stops renaming anything or still renames everything.
 

A:Solved: Help with a File rename Batch script!

Read other 8 answers
RELEVANCY SCORE 68

For starters i would like to apologize about my bad English, i don't use it that frequently so might have a hard time to express myself good enough for you to understand what im trying to do.

I have a .csv file where A1 and B1 will be having constant values, the values are A1 = Name B1 = Order number.

Im trying to figure out if a script could help me to populate the cells beneath A1 and B1?

If it could ask me for name: and then i would have to type in a name that would populate A2, A3, etc. Perhaps it could also ask me for the amount? so if i put in the name "Adapter" and then it asks me for amount where i type in 10 it would put the word "Adapter" in A2-A11

I would also like it to ask me for an order number that would be put into A2-A11 in this case.

The amount that i would like to put in will vary from time to time.

IThis is what i would like the CSV file to look like after inserting the name "Adapter TKS-B" and the amount: 29 along with the order number: 123456. Hopefully you will understand how i want to populate the .csv file.

Is this possible? Again im terribly sorry for my bad English.

Thanks in advance
 

Read other answers
RELEVANCY SCORE 68

Assume I have a csv file (eg config.csv) set out as follows:

A,B,C
1,abc,def
2,ghi,jkl

I would like to be able to pass a batch script a parameter that uniquely identifies a line (record) in the csv file, eg:

script.cmd 2

and have the script then:

- read the line of the csv file that corresponds to the parameter given (ie 2,ghi,jkl) and
- set variables by parsing this line, eg:

set B=ghi
set C=jkl

I am very new to any form of coding, including batch scripting. I've read the help on FOR statements and searched the net and this forum but am hoping someone might be able to point me in the right direction, help me get started or provide a solution.

Thanks.
 

A:Parse csv file to set batch script variables

Read other 7 answers
RELEVANCY SCORE 68

I need to script/batch a way of changing file permissions on a whole directory tree. Any ideas on how to do this?
 

Read other answers
RELEVANCY SCORE 68

I am making a batch file that moves an .exe file. whenever it moves the file the extension(.exe) gets removed and the file type is just "file". this doesnt happen with regular files like .txt .jpg ....
 

A:Solved: Batch script help with file extensions

Read other 7 answers
RELEVANCY SCORE 68

Hello, I need batch file or registry to disable the date and time option

A:Need batch file to disable the date and time option

Best method is to use the Group Policy manager to disallow users from access to this facility

Date and Time - Allow or Prevent Users and Groups from Changing

Read other 1 answers
RELEVANCY SCORE 68

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 68

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
 

Read other 2 answers
RELEVANCY SCORE 67.6

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 67.6