topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 23, 2024, 7:19 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - foolios [ switch to compact view ]

Pages: [1]
1
Yes, I am interested as long as it doesn't require the program to be installed in order for the scripts to work on any other computer: XP, Vista.

I will check the link out. THanks for the recommendation. I am interested in learning more.

2
Ok, then I will do so. =)

Do you think there is a way that the batch file can take whatever name it's called and input that name to a copied file?

For example:
copy C:\TestCopy\myicon.ico C:\TestCopy\datafolder
rename C:\TestCopy\myshortcut.ico   \myshortcut.ico + batchfilename.bat

Let me explain further. Lets say we have a batch file called joe.bat
Can we have joe appended to the name of the shortcut called myfaveshortcut via the very same batch file?
So the name of the shortcut will get personalized to the name of a person on the batch file.
So lets say I give the batch file to Cindy, then she would just rename the batch file to cindy.bat and that the name that would be appended to the shortcut's filename;
myshortcut_cindy.url

I was hoping something like that could be done. You may not know or maybe it is not possible, but if you do know and it is I will definitely search for a way. =)

3
YES!

It all worked. That was soo exciting!
Thank you so much my friend. I am going to take my newfound knowledge and try to apply it to some other ideas.

Is there anything I can do for you my friend?
I hope you don't mind my adding you to my buddy list.

Thank you sooo very much.

4
@echo off
for %%f in (myicon.ico, myieshortcut) do copy "C:\Documents and Settings\All Users\Desktop\TestCopy\%%f" "C:\Documents and Settings\All Users\Desktop\TestCopy\datafolder"

[/quote]

I will try, thank you.

5
Most excellent, thanks for the detailed explanation.

I have two more questions;
How do I represent spaces in a directory that leads to the file?
How do I represent the current directory of the batch file I am using along with the files to be copied?

For example, if I had the files to be copied and the batch file in a usb thumb drive but that drive could change depending on what computer I put it in.
I was wondering if I could represent the root of the drive for the copy from.
So for our example:
copy \TestCopy\myicon.ico C:\TestCopy\datafolder
copy \TestCopy\myieshortcut.url C:\TestCopy\datafolder

Does that appear correct to you?

6
You are the man my friend. It displayed the file extension. Thank you so much.

@echo off
for %%f in (myicon.ico, myieshortcut) do copy C:\TestCopy\%%f C:\TestCopy\datafolder

What does that line do besides copy? what is for %%f in mean?
and the line: @echo off, that removes extra spaces right?

thanks again

EDIT: it looks to me like:
for %%f in (myicon.ico, myieshortcut)

sets a variable with those two file names in it. If so, that 's just awesome!

EDIT:
for the location:
C:\Documents and Settings\All Users\Desktop

I seem to remember that spaces couldn't be used, maybe that's why my file isn't copying to the desktop when I try it.
Am I to put % or something in places where a directory name is a space when dealing with the windows file system?

THanks

EDIT: Yes, that's most definitely the problem I think. And I don't think % is the answer for spaces. I get the error incorrect syntax on the part where I am trying to copy to a directory with spaces.

7
Ok, this is what I have then so far.

copy C:\TestCopy\myicon.ico C:\TestCopy\datafolder\
copy C:\TestCopy\myieshortcut C:\TestCopy\datafolder\

The problem is that the second line is a shortcut, an internet shortcut. I don't know the file extension to it as it's not showing even with file extension view enabled for folder options.

Is there an extension?
Also, how can I shorten the two lines? Is it possible to use one copy command to perform both copies?

Thanks for replying.

8
Script/batch file that copies two files from a drive(usb) to a location within a windows directory.

If I had a thumb drive and I wanted to make two files go to two different locations by just running the script.
Would the dos commands like:
copy f:\data\data.exe c:\windows\system32\data
copy f:\data\pic.jpg C:\Documents and Settings\Administrator\Desktop

work in a bat file?

I don't have a usb drive to test atm. Thanks so much in advance.

9
Thank you for showing how the post action can work.
I am going to go with a different idea, one that I believe will more likely be possible. I'll post that separately.

Thanks for all the input.

10
Nope didn't work for this site for example.
start iexplore "https://www.donation...#new?search=whatever"


so the result was the page:
https://www.donation...#new?search=whatever

but the search box remained empty.

So I guess google is a special case.

11
I just used that as an example. Maybe that's a bad example.

Hmm, I should try my code on a couple different sites to see what happens. I just don't know why google's page will put it into the form field but a different one wouldn't. But maybe like you said, maybe it's because it uses flash. I did notice that the name field had an odd name account[email]. I 'll try a different page.

12
Thanks so much for your knowledge. I wasn't aware of the difficulties.
I had hoped there was a way to do this, mainly so that I could share it with people that I work with.
But being that I would need a proprietary piece of software to have a similar kind of functionality, that won't do for the idea.
I didn't want everyone I meet to buy/install software.
So, for now it looks like I'll have to put this on the back burner until I have a better understanding of the limitations to the idea and what else I would rather do with it.

Thanks again for the help!

13
Well, I don't want the script to submit the page.
That's not a big deal for me.

But what I would like is that a field in the form on the page gets a word put in for me so that I don't have to manually type it.

I was hoping for a script. That way I wouldn't have to use any special software, just be able to go to any system with a batch file on my usb stick, double click my batch file, and walla the webpage that opens up will have my name or whatever in a particular field already. Then I can continue filling in the rest of the form and afterwards submitting it manually.

So far the script I have opens a web browser, directs to the page, but only at certain pages like google that accept string addendiums(sp?) does it work. I was hoping for a way to do it on any web page.

But if it's not possible this way, does autohotkey create exe's? Or does autohotkey have to be installed on the system that I use their custom scripts for.

I was hoping for something general, every kind of case thing.

Thanks for the replies.

14
Something like this:
start iexplore "http://www.google.com/search?q=whatever"

But that only works for a page like that one.

I was hoping for one that would work on all pages. Opens a browser window, directs to a page and then fills a form field with a word.

For example something similar doesn't work on the following page:

http://www.crissangel.com/login
where the form field is named: account[email]

start iexplore "http://www.crissangel.com/login?account[email]=whatever"

Thanks in advance

Pages: [1]