drop a file and delete file with the same name

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 16 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
palmtree3000
Posts: 3
Last visit: Sat Aug 11, 2007 1:46 am

drop a file and delete file with the same name

Post by palmtree3000 »

I'm using a batch file so i can drag and drop .tex files and get .pdf's. But when i do it, it also generates a .log and a .aux file, nither of which i want to keep arround. But i can't figure out how to delete them automaticaly. For example, hello.tex, when dropped onto my batch file, generates hello.pdf, hello.log, and hello.aux.Here's my source. For reasons i'm not entirely sure, it kept starting in some alcohol 120%'s file and dumping the files there, so that's why i have all the "cd .."'s in there.@echo offcd ..cd ..cd ..cd ..cd ..cd ..cd ..cd ..cd ..cd LaTexpdflatex %1pauseThanks!
User avatar
palmtree3000
Posts: 3
Last visit: Sat Aug 11, 2007 1:46 am

drop a file and delete file with the same name

Post by palmtree3000 »

I'm using a batch file so i can drag and drop .tex files and get .pdf's. But when i do it, it also generates a .log and a .aux file, nither of which i want to keep arround. But i can't figure out how to delete them automaticaly. For example, hello.tex, when dropped onto my batch file, generates hello.pdf, hello.log, and hello.aux.Here's my source. For reasons i'm not entirely sure, it kept starting in some alcohol 120%'s file and dumping the files there, so that's why i have all the "cd .."'s in there.@echo offcd ..cd ..cd ..cd ..cd ..cd ..cd ..cd ..cd ..cd LaTexpdflatex %1pauseThanks!
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

drop a file and delete file with the same name

Post by jhicks »

Are the files created in the same directory? Are there any other log or aux files in that directory that you *need*? If not, you should be able to add linesdel *.logdel *.aucafter pdflatex %1
User avatar
palmtree3000
Posts: 3
Last visit: Sat Aug 11, 2007 1:46 am

drop a file and delete file with the same name

Post by palmtree3000 »

That worked like a charm, thanks so much!
This topic is 16 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked