Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Save as problem
#3
(Jun-17-2020, 03:48 PM)snippsat Wrote:
>>> import os
>>> 
>>> input_dir = 'C:data' # There is a problem here
>>> output_dir = os.path.join(input_dir, 'output') 
>>> output_dir
'C:data\\output' 
>>> 
>>> # Fix
>>> input_dir = 'C:\\data'
>>> output_dir = os.path.join(input_dir, 'output') 
>>> output_dir
'C:\\data\\output'
I fixed the data part to input_dir = 'C:/data'

This still doesn't fix the issue I'm having when trying to do a save as. The script runs fine till the save part where I want to use the excel file "outputnames" which has a list of names I want to use. I don't want it to save with the same file name that initially get's read in. So I have a list in an excel file that has the names that I want each file to be saved as.
Reply


Messages In This Thread
Save as problem - by Kristenl2784 - Jun-17-2020, 03:17 PM
RE: Save as problem - by snippsat - Jun-17-2020, 03:48 PM
RE: Save as problem - by Kristenl2784 - Jun-17-2020, 04:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to save to multiple locations during save cubangt 1 559 Oct-23-2023, 10:16 PM
Last Post: deanhystad
  problem using exec to save local variables dkarl 0 1,801 Dec-01-2019, 08:52 AM
Last Post: dkarl

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020