473,396 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Copy name of folder/subfolder

i'm new to this scripting lark and

i need to be able to copy the name of a folder/subfolder into a path statement so i can then use that path to extract data from a specific file in that folder

if anyone could help i'd be grateful

thx
Dec 2 '09 #1
2 2473
bvdet
2,851 Expert Mod 2GB
Your question is unclear. In the future, please use a more appropriate title. See posting guidelines.

If you assign a folder/subfolder name to an identifier, you can can use that in a path with string formatting. Example:
Expand|Select|Wrap|Line Numbers
  1. >>> name = "my_folder/my_subfolder"
  2. >>> path = "C:/root_folder/%s/" % (name)
  3. >>> path
  4. 'C:/root_folder/my_folder/my_subfolder/'
  5. >>> 
Dec 2 '09 #2
apologies was in a rush when sent post

many thanks for response, will try when back at work tomorrow
Dec 2 '09 #3

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

Similar topics

3
by: Jake | last post by:
I know how to copy files from one location to another but how would I go about copying a file from one directory into serveral - or actually all subdirectories in a single action? Some kind of...
3
by: Johnny | last post by:
Hi, I have created an ASP.NET application (let's call it FooBar) with VS.NET on my local machine, residing in http://localhost/FooBar. Deploying it to another folder on my machine works well...
1
by: Johnny Fugazzi | last post by:
I have a relatiovely simple need. I would like to have a webpage that a user can go to, fill out a couple of fields, and then hit OK where the result is that a Folder Template is copied and a...
9
by: Paul | last post by:
I'm trying to make get my app to delete all the files in a specified folder and all the files within the folders of the specified folder. e.g. Folder 1 contains three files (File1, File2, File3)...
17
by: rdemyan via AccessMonster.com | last post by:
With A2003, I'm having trouble accessing files in a folder on another computer where back-end files, update files, etc are located. Here's the scenario: 1) Computer #1 - A2003 2) Computer #2 -...
1
by: gujarsachin2001 | last post by:
Hello friends, I have one folder Named as MainFolder on server. I have one more folder named as subfolder inside tht main folder.Now I want to save some pictures in tht folder but at runtime I m...
2
by: pappu | last post by:
Hello friends, I have one folder Named as MainFolder on server. I have one more folder named as subfolder inside tht main folder.Now I want to save some pictures in tht folder but at runtime I m...
5
by: woolls01 | last post by:
I am using the following code Sub Ck() Dim strStartPath As String strStartPath = "d:\workpack\rra" ListFolder strStartPath End Sub
11
by: =?Utf-8?B?UGF1bA==?= | last post by:
I did a google search but could find what I was looking for. I am creating a temporary folder and placing files in it with a web application. The temporary folder name needs to be changed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.