Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Super Simple Script to remove first characters of any png file Post 302777307 by Corona688 on Thursday 7th of March 2013 03:44:12 PM
Old 03-07-2013
And a version which works in batch:

Code:
for %%A in (*.txt) DO (
        set V=%%A
        echo rename %V% %V:~2%
        )

It needs %% instead of % because:

Quote:
Originally Posted by Corona688
Windows CMD is inconsistent here in that more %'s are required when you put this in a batch file than when you run it in a shell window
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to find and remove characters

Hi. I have many files in a folder, and even more in the subfolders. I need a script that finds and removes certain characters (them being /n in this one) in the files in the folder and it's subfolders. So, could someone write me a script that works in Linux, does this: Searchs for "/n" in... (5 Replies)
Discussion started by: Zerby
5 Replies

2. Shell Programming and Scripting

SUPER simple bash script to repeat a command...

I need to repeat this command on a configurable interval: igal -a -r -U -w 6 I tried this: #!/bin/bash igal -a -r -U -w 6 sleep 30 Just a guess that it MIGHT work. Can anyone point me in the right direction? -R (6 Replies)
Discussion started by: robfindlay
6 Replies

3. Shell Programming and Scripting

Remove characters from file name

Here is my code. for file in *1.3.html ; do mv "$file" `echo $file | tr '.1.3' ''` ; done For some reason I am getting an error. mv: file.idlesince.1.3.html and file.idlesince.1.3.html are identical Could this be done a different way? (5 Replies)
Discussion started by: mrlayance
5 Replies

4. Shell Programming and Scripting

Trying to remove '^M' characters from a file.

Hi guys, Hope you are all well. This is a line of data from a csv file. I have used vi and set the 'set list' option to display the trailing $ character. "01","Grocery","01006","eat Fish & Spreads"$ I have tried the following commands, but neither of them appear to be working? 1) tr... (13 Replies)
Discussion started by: Krispy
13 Replies

5. Shell Programming and Scripting

How to remove Ctlr-M characters from file from a unix script

There are 10 files present which have Ctlr-M characters appended to each line of all files. I have a unix script which processes the files in a loop. And there is an inner loop which processes each line in the file concerned. #inputFile is a variable which has the file name of the input... (2 Replies)
Discussion started by: akashtcs
2 Replies

6. Shell Programming and Scripting

Remove the characters from the file

Hi, I have one file in the following format. exa_resu_adj.4ge v.47645 PERSONAL INFORMAIONS PVT LTD 31 Dec 2009 04:36 Page 1 SALARY REPORT Account Account Name CCode Bill No Balance T Amt ----------- ------------ ------- ---------- ------------- ------------- 17490001 Mr Ram PM 10... (6 Replies)
Discussion started by: Kattoor
6 Replies

7. Shell Programming and Scripting

cgi script to print all .png files on a single page

Hi guys I'm relativley new to Perl, and have not touched html before, im trying to write a cgi script that prints all images on a single html page from a given directory. Im using perl to gather stats, rrdtool to update and create graphs now i just need to print these graphs all onto 1 index.cgi... (3 Replies)
Discussion started by: jeffersno1
3 Replies

8. Shell Programming and Scripting

Want to remove the last characters from each row of csv using shell script

Hi, I've a csv file seperated by '|' from which I'm trying to remove the excess '|' characters more than the existing fields. My CSV looks like as below. HRLOAD|Service|AddChange|EN PERSONID|STATUS|LASTNAME|FIRSTNAME|ITDCLIENTUSERID|ADDRESSLINE1 10000001|ACTIVE|Testazar1|Testore1|20041|||... (24 Replies)
Discussion started by: rajak.net
24 Replies

9. UNIX Desktop Questions & Answers

Remove new line characters from a file

I tried using below command tr -cd "" < InputFile.xml > output.txt ============= This removes all the tabs/newline/extra spaces from a file it successfully removed all the extra spaces,tabs and new line characters but then the complete file become one record. I want to retain one new line... (1 Reply)
Discussion started by: saini
1 Replies

10. Shell Programming and Scripting

Remove characters from the file

i know , the below question has been repeated. can you guys guide me . I have the below input 999999 xxxxxxxxxxxxxx 123.45 2013-05-02 08:14 1 1 1 xxxx 999999 xxxxxxxxxxxxxx 123.45 2013-06-02 02:14 1 4 1 dddd i need to remove from the column 54 to 70 , as like the below output.... (9 Replies)
Discussion started by: expert
9 Replies
TEXI2DVI(1)							   User Commands						       TEXI2DVI(1)

NAME
texi2dvi - print Texinfo documents SYNOPSIS
texi2dvi [OPTION]... FILE... DESCRIPTION
Run each Texinfo or LaTeX FILE through TeX in turn until all cross-references are resolved, building all indices. The directory containing each FILE is searched for included files. The suffix of FILE is used to determine its language (LaTeX or Texinfo). Makeinfo is used to perform Texinfo macro expansion before running TeX when needed. Operation modes: -b, --batch no interaction -c, --clean remove all auxiliary files -D, --debug turn on shell debugging (set -x) -h, --help display this help and exit successfully -o, --output=OFILE leave output in OFILE (implies --clean); Only one input FILE may be specified in this case -q, --quiet no output unless errors (implies --batch) -s, --silent same as --quiet -v, --version display version information and exit successfully -V, --verbose report on what is done TeX tuning: -@ use @input instead of input; for preloaded Texinfo -e, -E, --expand force macro expansion using makeinfo -I DIR search DIR for Texinfo files -l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo) -p, --pdf use pdftex or pdflatex for processing -r, --recode call recode before TeX to translate input characters -t, --command=CMD insert CMD in copy of input file or --texinfo=CMD multiple values accumulate The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO, TEX (or PDFTEX), TEXINDEX, and THUMBPDF environment variables are used to run those commands, if they are set. Any CMD strings are added after @setfilename for Texinfo input, in the first line for LaTeX input. REPORTING BUGS
Email bug reports to <bug-texinfo@gnu.org>, general questions and discussion to <help-texinfo@gnu.org>. Texinfo home page: http://www.gnu.org/software/texinfo/ COPYRIGHT
Copyright (C) 2004 Free Software Foundation, Inc. There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING. SEE ALSO
The full documentation for texi2dvi is maintained as a Texinfo manual. If the info and texi2dvi programs are properly installed at your site, the command info texi2dvi should give you access to the complete manual. texi2dvi 1.34 December 2004 TEXI2DVI(1)
All times are GMT -4. The time now is 11:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy