You are on page 1of 7

7/18/2014 Need to create a batch file- I am new

http://en.kioskea.net/forum/affich-225498-need-to-create-a-batch-file-i-am-new 1/7
High-Tech
Health
Sign up for free
Language
English
Spanish
German
French
Italian
Portuguese
Dutch
Login
Identification
Username
Password ( forgot? )
Login
Follow us
159,878
To receive the newsletter
Your email address OK
Recherche
Search OK
Home
Forum
Ask a question
Latest queries
Windows
Mac
Linux
Internet
Video games
Software
7/18/2014 Need to create a batch file- I am new
http://en.kioskea.net/forum/affich-225498-need-to-create-a-batch-file-i-am-new 2/7
Hardware
Mobile
Network
Virus
Cafe
How-To
Download
Ask a question
Windows software
Mac software
Linux software
Android Apps
Blackberry Apps
iPhone Apps
Windows Phone Apps
News
Articles
Well being and health care
Discover
Home
Forum
Programming
Need to create a batch file- I am new
Print
Statistics
Ask a question Report
Need to create a batch file- I am new [Closed]
bemarc - Latest answer on Dec 27, 2011 12:01AM
Hello,
I am new in using batch files. I was looking into the forum and in the web I did not found any useful information.
my first question is :
I have a lot of BDF file ( bulk Data file) that I need to run it with Nastran. i would like to create a simple batch file ( call
file one by one and run it with Nastran). Any suggestion will be very helpfull.
the second one:
I need a batch file to extract result data from a lot of text file.
Thank you for your help
7/18/2014 Need to create a batch file- I am new
http://en.kioskea.net/forum/affich-225498-need-to-create-a-batch-file-i-am-new 3/7
Need to create a batch file- I am new
Creating a Batch File to copy a directory How-To - Windows
Creating a batch file to get filenames & timestamps 2 How-To - Windows
Creating a Batch File to copy a directory (Solved) Forum - Programming
A batch file to delete temp user files How-To - Windows
Configuring proxy through batch file (Solved) Forum - Internet
More
Answer
+4

Report
DB Dec 27, 2011 12:01AM
Just open a notepad
Type the installation path of your nastran
Installation_drive\MSC.Software\MSC_Nastran\20101\bin\nastran.exe "Complete path of your file to be
solved(including .filename.bdf)"
Similarily enter all the other files in the same format in the consecutive lines
Once this is done save the file and change the extension as .bat
Just run the .bat file
I will solve all the files in the order entered.
Annonces Google
Cheap Flights
Get the cheapest flights Deals! Find & Compare Prices on Flights.
air-2000.tripbase.com/Deals
Answer
+3

Report
Richard.Williams 25Posts Saturday November 7, 2009Registration date July 18, 2012Last seen Jan 5, 2010 04:36PM
Here is an alternative. It will feed all .bdf files under folder "C:/path/to/bdf files" to nastran.
# Script nastran.txt
var str list, file
lf -n "*.bdf" "C:/path/to/bdf files" > $list
while ($list <> "")
do
lex "1" $list > $file
system nastran ("\"jid=\"+$file+"\"")
done
7/18/2014 Need to create a batch file- I am new
http://en.kioskea.net/forum/affich-225498-need-to-create-a-batch-file-i-am-new 4/7
Script is in biterscripting. Save the script in file C:/Scripts/nastran.txt. Call the script by entering the following command
in biterscipting.
script "C:/Scripts/nastran.txt"
Now, in terms of,
I need a batch file to extract result data from a lot of text file.
Can you please elaborate ?
Answer
+0

Report
Hawk Dec 24, 2009 11:10AM
Hi there,
Since i am not sure how Nastran works, I can help you to get the files one by one. Please find the script below,
Includes two batch file,
1. To list all the files into a text file
2. To keep removing the first line (first file name) from the txt file.
Note: For your purpose, you have to work with the first file name where i have commented using rem command before
calling the second batch file
first batchfile:
-------------------
@echo off
if not exist ff.txt (for /f "tokens=* delims= " %%h in ('dir /b/s "C:\Documents and Settings\603389649\Desktop\test1" ^|
find /v "*.dat"') do echo %%h >> ff.txt)
for /f "delims=" %%x in ('type ff.txt') do (
set h=%%x
goto hh
)
:hh
7/18/2014 Need to create a batch file- I am new
http://en.kioskea.net/forum/affich-225498-need-to-create-a-batch-file-i-am-new 5/7
rem here i have printed the file name one by one
rem If you know how to use it with Nastran, use it here.
echo %date% %time% %h% >>file.txt
echo -------------------- >>file.txt
call dell.bat
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Second batch File: (dell.bat)
rem This is to remove the first line from a file
@echo off
for /f "skip=1 tokens=*" %%A in (ff.txt) do echo %%A >> d2.txt
del /q ff.txt
rename d2.txt ff.txt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please let me know if you have any problem
Report thanks For help- Jan 5, 2010 03:04PM
Thanks fro Help, but it didn't work.
I called Nastran from command prompt and now I have to find out how to include all the input file name.
thanks again and i will let you know
Report MZ- Apr 20, 2010 03:10AM
hi
as i tried that you should run the nastran with .dat file and this .dat file must includ the .bdf file
but you need to learn how to creat the.dat file
Ask a question
This document entitled need to create a batch file- I am new from Kioskea (en.kioskea.net) is made available under
the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license,
as this note appears clearly.
Register now
Not a member yet?
sign-up, it takes less than a minute and it's free!
Members get more answers than anonymous users.
Being a member gives you detailed monitoring of your requests.
Being a member gives you additional options.
7/18/2014 Need to create a batch file- I am new
http://en.kioskea.net/forum/affich-225498-need-to-create-a-batch-file-i-am-new 6/7
Receive our newsletter
email OK
Kioskea
159,878 Like
Subscribe
Team
Find us on Facebook
Kioskea
159,878 people like Kioskea.
Facebook social plugin
Like
7/18/2014 Need to create a batch file- I am new
http://en.kioskea.net/forum/affich-225498-need-to-create-a-batch-file-i-am-new 7/7
Terms of Use
Contact
Charter
CCM Benchmark Group
health.kioskea.net

You might also like