473,796 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using % character in batch file

3 New Member
Hi,
I am creating a small batch file that (hopefully) will copy files from one name to another. however one batch of files cause problems - for the application they are going to be used in, they have to have a % sign in the name - i.e. 1194EL%2f03.jpg (they are all image files).

When I run the following, the % sign is removed, obviously as it has a certain use in batch files.

copy 10_20tc_500.jpg 10%2f20X1%2f2TC .jpg
copy 10_20tc_500.jpg 10%2f21X1%2f2TC .jpg
copy 10_22tc_500.jpg 10%2f22X1%2f2TC .jpg
copy 10_22tc_500.jpg 10%2f22X12MMTC. jpg
copy 10_23tc_500.jpg 10%2f23X3%2f8TC .jpg
copy 10_25tc_500.jpg 10%2f25X1%2f2TC .jpg
copy 10_25tc_500.jpg 10%2f26X1%2f2TC .jpg

anyway to use this and keep the %?


Thanks
Apr 24 '07 #1
2 5888
Banfa
9,065 Recognized Expert Moderator Expert
Try using %% where you want the % sign.

However I am a little worried, it looks like this may be from or directed 2 the web and %<HexValue> is the http way of specifying characters that shouldn't be actually written.

It follows from your file names that %2F is the character / which is unlikely to be valid in a file name.

Of course I could be reading more into this that actually exists.
Apr 24 '07 #2
smiler2505
72 New Member
enclose the filenames in double quotes should do it too
Apr 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

14
3560
by: Mark C. | last post by:
I'm trying to call a batch file that I've built using the FileSystemObject and CreateObject("Wscript.Shell"), oShell.Run... in an asp script. Naturally, I can get the script to work from a command line but not from a browser. The page does not throw an error but the oShell.Run... portion of the script doesn't run. Any help would be appreciated. Thanks.
4
47543
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup) 4) Once the copy is complete, the batch file opens the Access database again 5) EXIT should close out the cmd window but it does not execute that line
5
8358
by: Mark | last post by:
Hi all, I am trying to execute a batch file to copy over files from one server to another. The batch file is using robocopy to copy over the files. ============ private void CopyFiles() {// Use the process name space to copy over the files System.Diagnostics.Process oProc = new System.Diagnostics.Process(); oProc.StartInfo.FileName ="c:\CopyFiles.bat" ; oProc.Start();
1
5795
by: Bucky Pollard | last post by:
I have a web service that needs to create a batch file and call it (since there are no APIs for the functionality I am looking for). I am using the Process and ProcessStartInfo objects. When I try to call the batch file, it just returns with a return code of 1. When I call cmd.exe, and pass the batch file as a parameter it hangs. After much frustration and aggrevation, I found that CMD IS in fact running, but it is running under the context...
2
1658
by: Stephen | last post by:
Hi all, I want to create an app that runs a batch file which inturn runs applications. question: if I start the batch file from app1, how can app1 know that the batch file ran successfully and there was no errors.. (is there a return type) we run a lot of sql jobs using batch files, so we want to create a user interface to run batch files
1
4034
by: DropIn | last post by:
Sheesh! I was doing research on using batch files as drop targets when I came across a python discussion thread on this site with the same topic. I thought I would share what I had learned (the hard way), but I could find no way to reply to that thread (even after registering!). Anyway, wrapping the python script in a batch file is a good idea, but I believe the problem the python programmer was encountering was how Windows automatically...
0
1578
by: -pb- | last post by:
Hi, I have developed a web site for my client on .net 2.0 framework using asp.net 2.0. This web site will be hosted on Windows 2003 server. Web application runs the batch file on the user button click. This batch file runs isql, isqlw or bcp utility of sql server to pull the data from database. This command generates the .csv file by executing the query.
0
1100
by: prateekbaxi | last post by:
Hi, I developed a web site for my client on .net 2.0 framework using asp.net 2.0. This web site will be hosted on Windows 2003 server. Web application runs the batch file on the user button click. This batch file runs isql, isqlw or bcp utility of sql server to pull the data from database. This command generates the .csv file by executing the query. Initially this web app was hosted on Windows 2000/XP server and it worked fine. It had...
14
12832
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in case it's a question, i want to popup a messageBox or something, and bring back to the batch file the result (Yes\No question). I know how to excute the batch file and get all the Standard output at the end, but i don't know who can i read it line by...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10452
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10221
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10169
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.